I'm tuning Oracle 12c DB and trying to load some tables to INMEMORY
partition. So, I'm altered 2 tables with CRITICAL PRIORITY
. But, when I'm trying to SELECT
some data from table in memory, it collects from general patition. I've got it from Autotrace.
What I'm doing wrong?
The IMCO(Inmemory Coordinator) process wakes up every two minutes and checks to see if any population tasks needs to be completed. So, querying a table immediately after enabling it for inmemory doesn't ensure that query to be served from inmemory.
Objects are populated into the IM column store either in a prioritized list immediately after the database is opened or after the tables are scanned (queried) for the first time.
For example, if we enable table tab1, tab2, tab3 for inmemory:
alter table tab1 inmemory priority medium;
alter table tab3 inmemory priority high;
alter table tab2 inmemory priority critical;
These tables get into inmemory when:
select * from tab1
) before the IMCO process kicks in (in every 2 mins)To know if a table/partition is loaded completely into inmemory you can query v$im_segments
view like following:
select owner, segment_name, partition_name, segment_type, bytes,
bytes_not_populated, populate_status from v$im_segments;
So, to answer your question:
v$im_segments
Check this whitepaper for more details.