The FLUSH command writes all tables loaded until this checkpoint to disk and makes the in-operable for joins, updates, delete and other statements. Tables flushed to disk will be available in the final InMemory datastore and can be used in TARGIT.
Syntax:
FLUSH
Example:
/* In this example we are using the Oracle Managed Data provider */
/* and retrieving data from an Oracle database */
LOAD ASSEMBLY 'Oracle.ManagedDataAccess.dll'
DATASOURCE oracledb=DOTNET CONNECTION 'Oracle.ManagedDataAccess.Client.OracleConnection'
'data source=(DESCRIPTION =(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =myOracleServer)(PORT = 1521)))
(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = )));User Id = oracleLogin; Password = readOraclePassword'
/* Read the SalesInvoiceLines table with 400 mill rows */
IMPORT SalesInvoiceLines=oracledb.{SELECT * FROM SALESINVOICELINES}
/* Write the table to disk and release memory */
FLUSH
/* Import other tables where we don't need to worry about memory */
DO PARALLEL
IMPORT LOCATIONS=oracledb.{SELECT * FROM LOCATIONS}
IMPORT DEPARTMENTS=oracledb.{SELECT * FROM DEPARTMENTS}
IMPORT PRODUCTS=oracledb.{SELECT * FROM PRODUCTS}
IMPORT EMPLOYEES=oracledb.{SELECT * FROM EMPLOYEES}
END PARALLEL
/* Commit data to disk */
SAVE
Comments
Please sign in to leave a comment.