How To Implement IN - MEMORY - BASE - LEVEL
How To Implement IN - MEMORY - BASE - LEVEL
Myself Rahul Kurkute. In 12.1.0.2 version, Oracle introduced IN-MEMORY feature which allows you to store the tables,
tablespace, partitions, columns, MVIEW in memory of SGA in a columnar format instead of typical row format. Oracle
Database configured with Database In-Memory delivers optimal performance. Both analytical queries and OLTP
transaction’s processing speeds can be increased without changing existing applications.
The IM column store is a separately licensed option of Oracle Database Enterprise Edition.
Most DBAs are not aware that the IN-MEMORY feature can be used for FREE. Oracle Database In-Memory “Base Level”
feature allows the use of Database In-Memory with up to a 16GB column store without having to license on EE.
Yes!!!!!!! Just need to set SPfile parameters INMEMORY_FORCE to BASE_LEVEL & INMEMORY_SIZE to less than 16 GB
value. This will allow the use of Database In-Memory with up to a 16GB column store for no extra cost. The Base Level
lets you to experiment with Oracle Database In-Memory features without purchasing the Oracle Database In-Memory
option. This setting is available starting with Oracle Database 19c, Release Update 19.8.
When the Base Level is enabled, the value of the INMEMORY_SIZE initialization parameter is limited to 16 GB for a CDB.
In an Oracle RAC environment, the value of INMEMORY_SIZE is limited to 16 GB for each instance. The compression
level for all objects and columns for INMEMORY is automatically and transparently set to QUERY LOW.
Automatic In-Memory is disabled, and In-Memory Column Store feature tracking is tracked for "In-Memory Base Level"
rather than "In-Memory Column Store." The CellMemory feature is disabled for Oracle Exadata.
In-Memory Column Store (IM Column Store)
In this document, I will demonstrate how to implement the IN-MEMORY BASE-LEVEL feature in Oracle Database, which
enhances query performance by storing tables, partitions, or columns in memory for fast retrieval.
Wait..Wait… before actual start, if you are on 19.20+ onwards, you can run a new In-Memory Eligibility Test. The
purpose of the eligibility test is to create a simple way of identifying if your database workload would benefit from
Database In-Memory. If the database is identified as "eligible" then it is a candidate for running the Oracle Database In-
Memory Advisor.
Ensure that a higher percentage of analytic workload results in greater benefits from INMEMORY implementation.
Here is an example of running the In-Memory Eligibility Test
SQL>
SQL> print analysis_summary
ANALYSIS_SUMMARY
----------------------------------------------------------------------------------------------------------------
Observed Analytic Workload Percentage is 64.10% is greater than target Analytic Workload Percentage 20%
SQL>
System altered.
System altered.
As we can see out of assigned 500 MB, 347 MB allocated for 1MB Pool and 136MB allocated to a 64KB memory pool.
So, make a note while deciding value for INMEMORY_SIZE parameter always consider and add 30% more memory to
existing value. This is because approx. 30% of the INMEMORY_SIZE is allocated to a 64KB memory pool used for storing
metadata information.
Table created.
Table created.
SQL> alter table table1 inmemory priority high; <<<<<<<<<<<<< Changed table1 table property to inmemory
Table altered.
SQL>
no rows selected
Elapsed: 00:00:00.03
11:01:09 SQL> alter table test.table3 inmemory(OBJECT_NAME,OBJECT_ID,STATUS) no inmemory(EDITIONABLE,SHARDED,DATA_OBJECT_ID);
Table altered.
Elapsed: 00:00:00.49
11:02:21 SQL> select count(*) from test.table3;
COUNT(*)
----------
73243
Elapsed: 00:00:00.08
11:02:42 SQL>
col owner for a20
col segment_name for a20
SELECT OWNER, SEGMENT_NAME, BYTES/1024/1024 SIZE_IN_MB,INMEMORY_SIZE/1024/1024 INMEMORY_SIZE_MB,
BYTES/INMEMORY_SIZE COMP_RATIO, BYTES_NOT_POPULATED, POPULATE_STATUS FROM V$IM_SEGMENTS;
Elapsed: 00:00:00.02
11:03:06 SQL>
Elapsed: 00:00:00.05
--To place the table into the in-memory store, “INMEMORY” must be done explicitly at the table level.
Table altered.
Elapsed: 00:00:00.45
COUNT(*)
----------
73243
Elapsed: 00:00:00.02
11:04:08 SQL>
Elapsed: 00:00:00.00
11:13:30 SQL>
1) The In-Memory feature can be applied on a tablespace, table, partition, sub-partition, or materialized view,
however there are a few exceptions like:
2) Test INMEMORY implementation on lower/UAT environment first and then on PROD environment.
3) Make sure to set INMEMORY_QUERY=ENABLE and INMEMORY_MAX_POPULATE_SERVERS to Half of the
value of CPU_COUNT or the PGA_AGGREGATE_TARGET value divided by 512M, whichever is less.
4) For the Base Level, the IM column store size must not exceed 16 GB.
5) Execute the IN-MEMORY advisory to identify objects recommended for placement in-memory to enhance
analytical queries processing.
Thanks for taking your time and reading this. Stay tuned for the next PART.
https://blogs.oracle.com/in-memory/post/oracle-database-in-memory-base-level-feature
https://blogs.oracle.com/in-memory/post/database-in-memory-base-level-feature-now-available-in-198-ru
https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/INMEMORY_SIZE.html#GUID-B5BEB6BF-5308-485F-920D-CBB584DDDE8F
https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/INMEMORY_FORCE.html#GUID-1CAEDEBC-AE38-428D-B07E-6718A7225548
https://blogs.oracle.com/in-memory/post/dbim-resources
https://connor-mcdonald.com/2020/05/01/in-memory-opportunities-abound/
https://connor-mcdonald.com/2020/01/06/getting-the-most-out-of-in-memory/
https://docs.oracle.com/en/database/oracle/oracle-database/19/inmem/intro-to-in-memory-column-store.html#GUID-50E76567-3AD4-4886-A3B0-
A9089C67F9A7
https://www.youtube.com/watch?v=yoHlV7eH708&feature=youtu.be
https://oracle-base.com/articles/12c/in-memory-column-store-12cr1
https://www.youtube.com/watch?v=NkrTczwY8yM
https://hiteshgondalia.wordpress.com/configure-and-manage-in-memory-features/
https://www.oracle.com/a/tech/docs/twp-oracle-database-in-memory-19c.pdf
https://blog.yannickjaquier.com/oracle/in-memory-column-store-simple-example.html
Using Oracle Database In-Memory with Oracle E-Business Suite (Doc ID 2025309.1)