Search code examples
oracle-databaseoracle12cin-memory-database

How to load database from disc to in-memory for ORACLE 12c


I am new to oracle 12c and trying to measure the query time for the two cases,

  1. Disc based database

  2. In-memory database

    How can I know that the database I am currently accessing is on disc or in in-memory? How to enable the in-memory option so that I can load the data into memory?


Solution

  • 1) Check the value of the initialization parameter inmemory_size.

    SQL>show parameter inmemory_size
    

    2) Set the value of inmemory_size.

    SQL>ALTER SYSTEM SET inmemory_size = 20G scope=spfile;
    

    You may need to increate SGA size as well since IM column store takes memory from it.

    3) Alter table to load into memory

    SQL>ALTER TABLE hr.emp INMEMORY;
    

    Getting started with Oracle Database In-Memory