Configuring the Oracle Database In-Memory

To configure the In-Memory Database (IMDB):

  1. Set the INMEMORY_SIZE initialization parameter. This parameter specifies the amount of memory reserved for use by the IMCS. For example:

    INMEMORY_SIZE=60GB
  2. Use DDL statements to specify the tablespaces, tables, partitions, or columns to be read into the IMCS. For example:

    ALTER TABLE ps_ledger INMEMORY MEMCOMPRESS FOR QUERY DUPLICATE;
  3. Enter SELECT commands to populate the IMCS to load the IMCS faster. For example, the following is an SQL script for ALTERING a table (for example,. PS_LEDGER) in memory and parallelizing a SELECT command to load the IMCS representation of the TABLE.

    set timing onset echo onspool load_gl_bal_tables_inmem.logalter system set "_max_spacebg_slaves"=32 scope=both;alter table ps_ledger inmemory memcompress for query duplicate;select /*+ full(ps_ledger) parallel(32) */ count(*) fromps_ledger;spool off

Any subsequent SQL operation against this table (PS_LEDGER) that the optimizer determines could benefit from using the IMCS will be directed to use the IMCS.