1. enable inmemory
inmemory_size = 20G ( parameter setup )
(inmemory_clause_default : default action when inmemory object make. )
* disable / enable inmemory query at session level.
alter session set inmemory_query = disable
2. apply inmemory option for object
apply like the following syntax
"create table test1 (id number, name varchar2(10)) inmemory"
or
alter table test1 inmemory
or
alter table test1 inmemory memcompress for query low (id) no inmemory (name) -- specific column apply
select * from v$im_col_cu;
select table_name, segment_column_id, column_name, inmemory_compression from v$im_column_level;
select owner, segment_name, populate_status, bytes, inmemory_size, inmemory_compression,
bytes/inmemory
from v$im_segments;
==> After you query that table, it only store that table in inmemory.
-- query object info of inmemory
select table_name, cache, inmemory_compression, inmemory_priority, inmemory_distribute
from dba_tables where table_name = 'TEST1'
* inmemory option
- for dml : optimize dml operation
- for query low , for query high : focus on query performance.
- for capacity low, for capacity high : focus on decreasing object size using compression
3. query
select count(id) from test1 where id is not null;
select id, count(*)
from test1
group by id;
'RDB > Oracle' 카테고리의 다른 글
oracle 12c redact (0) | 2018.08.24 |
---|---|
oracle 12c top-n query (0) | 2018.08.24 |
오라클 메타정보 추출 (0) | 2018.08.20 |
oracle smart cache (0) | 2018.07.17 |
oracle 12c single patch 적용 (0) | 2018.07.17 |