Oracle 12c啟用inmemory特性
一、為資料庫啟用IM column store,需要完成以下步驟:
1、資料庫版本需12.1.0.2以上;
2、設定INMEMORY_SIZE初始化引數為非0值(最小要求100M);
3、重啟資料庫;
二、檢查資料庫哪些物件使用了inmemory,使用如下語句:
SELECT OWNER, SEGMENT_NAME, INMEMORY_PRIORITY, INMEMORY_COMPRESSION FROM V$IM_SEGMENTS;
三、檢視資料庫版本:
SQL> select * from v$version;
BANNER CON_ID
------------------------------------------------------------ ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 0
64bit Production
PL/SQL Release 12.1.0.2.0 - Production 0
CORE 12.1.0.2.0 Production 0
TNS for Linux: Version 12.1.0.2.0 - Production 0
NLSRTL Version 12.1.0.2.0 - Production 0
SQL> create table test_inmem(
2 id number(5) primary key,
3 test_col varchar2(15));
Table created.
注:SYS,SYSTEM,SYSAUX使用者下的物件無法使用IM column store特性。
SQL> select TABLE_NAME,INMEMORY_PRIORITY,INMEMORY_DISTRIBUTE,INMEMORY_COMPRESSION from user_tables;
TABLE_NAME INMEMORY INMEMORY_DISTRI INMEMORY_COMPRESS
------------------------------ -------- --------------- -----------------
TEST_INMEM
SQL> alter table test_inmem inmemory;
Table altered
SQL> select TABLE_NAME,INMEMORY_PRIORITY,INMEMORY_DISTRIBUTE,INMEMORY_COMPRESSION from user_tables;
TABLE_NAME INMEMORY INMEMORY_DISTRI INMEMORY_COMPRESS
------------------------------ -------- --------------- -----------------
TEST_INMEM NONE AUTO FOR QUERY LOW
1、資料庫版本需12.1.0.2以上;
2、設定INMEMORY_SIZE初始化引數為非0值(最小要求100M);
3、重啟資料庫;
二、檢查資料庫哪些物件使用了inmemory,使用如下語句:
SELECT OWNER, SEGMENT_NAME, INMEMORY_PRIORITY, INMEMORY_COMPRESSION FROM V$IM_SEGMENTS;
三、檢視資料庫版本:
SQL> select * from v$version;
BANNER CON_ID
------------------------------------------------------------ ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 0
64bit Production
PL/SQL Release 12.1.0.2.0 - Production 0
CORE 12.1.0.2.0 Production 0
TNS for Linux: Version 12.1.0.2.0 - Production 0
NLSRTL Version 12.1.0.2.0 - Production 0
四、啟用IN-MEMORY特性
SQL> show parameter inmemory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
inmemory_clause_default string
inmemory_force string DEFAULT
inmemory_max_populate_servers integer 0
inmemory_query string ENABLE
inmemory_size big integer 0
inmemory_trickle_repopulate_servers_ integer 1
percent
optimizer_inmemory_aware boolean TRUE
SQL> alter system set inmemory_size=200M scope=spfile;
System altered.
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1027604480 bytes
Fixed Size 2932096 bytes
Variable Size 738198144 bytes
Database Buffers 71303168 bytes
Redo Buffers 5455872 bytes
In-Memory Area 209715200 bytes =========》多了In-Memory Area
Database mounted.
Database opened.
SQL> show parameter inmemory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
inmemory_clause_default string
inmemory_force string DEFAULT
inmemory_max_populate_servers integer 1
inmemory_query string ENABLE
inmemory_size big integer 200M
inmemory_trickle_repopulate_servers_ integer 1
percent
optimizer_inmemory_aware boolean TRUE
五、建立測試表SQL> show parameter inmemory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
inmemory_clause_default string
inmemory_force string DEFAULT
inmemory_max_populate_servers integer 0
inmemory_query string ENABLE
inmemory_size big integer 0
inmemory_trickle_repopulate_servers_ integer 1
percent
optimizer_inmemory_aware boolean TRUE
SQL> alter system set inmemory_size=200M scope=spfile;
System altered.
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1027604480 bytes
Fixed Size 2932096 bytes
Variable Size 738198144 bytes
Database Buffers 71303168 bytes
Redo Buffers 5455872 bytes
In-Memory Area 209715200 bytes =========》多了In-Memory Area
Database mounted.
Database opened.
SQL> show parameter inmemory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
inmemory_clause_default string
inmemory_force string DEFAULT
inmemory_max_populate_servers integer 1
inmemory_query string ENABLE
inmemory_size big integer 200M
inmemory_trickle_repopulate_servers_ integer 1
percent
optimizer_inmemory_aware boolean TRUE
SQL> create table test_inmem(
2 id number(5) primary key,
3 test_col varchar2(15));
Table created.
注:SYS,SYSTEM,SYSAUX使用者下的物件無法使用IM column store特性。
SQL> select TABLE_NAME,INMEMORY_PRIORITY,INMEMORY_DISTRIBUTE,INMEMORY_COMPRESSION from user_tables;
TABLE_NAME INMEMORY INMEMORY_DISTRI INMEMORY_COMPRESS
------------------------------ -------- --------------- -----------------
TEST_INMEM
SQL> alter table test_inmem inmemory;
Table altered
SQL> select TABLE_NAME,INMEMORY_PRIORITY,INMEMORY_DISTRIBUTE,INMEMORY_COMPRESSION from user_tables;
TABLE_NAME INMEMORY INMEMORY_DISTRI INMEMORY_COMPRESS
------------------------------ -------- --------------- -----------------
TEST_INMEM NONE AUTO FOR QUERY LOW
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10271187/viewspace-1572155/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12c新特性Oracle
- Oracle 12c 新特性(四)Oracle
- Oracle 12c 新特性(三)Oracle
- Oracle 12c 新特性(二)Oracle
- Oracle 12c 新特性(一)Oracle
- 【12c Partitioning】Oracle 12c Partitioning特性Oracle
- Oracle 12c新特性--ASMFD(ASM Filter Driver)特性OracleASMFilter
- Oracle 12c新特性之Sequence的Session特性OracleSession
- Oracle 12C新特性-History命令Oracle
- Oracle 12c 兩個新特性Oracle
- Oracle 12C新特性In-MemoryOracle
- Oracle GoldenGate 12c 新特性OracleGo
- Oracle 12c DG新特性Far SyncOracle
- Oracle 12c 新特性之 temp undoOracle
- ORACLE 12C新特性——CDB與PDBOracle
- Oracle 12C新特性-RMAN恢復表Oracle
- Oracle 12C 新特性之級聯truncateOracle
- 12c新特性-Oracle Sharding簡介Oracle
- Oracle 12C 新特性之 恢復表Oracle
- Oracle 12c新特性 - Hybrid histogram 3OracleHistogram
- Oracle 12c新特性 - Hybrid histogram 2OracleHistogram
- Oracle 12c新特性 - Hybrid histogram 1OracleHistogram
- Oracle 12c新特性 - Top frequency histogram 3OracleHistogram
- Oracle 12c新特性 - Top frequency histogram 2OracleHistogram
- Oracle 12c新特性 - Top frequency histogram 1OracleHistogram
- Oracle Database 12c十二大新特性OracleDatabase
- Oracle 19C 無法啟用Auto Indexes特性OracleIndex
- inmemory OOM了OOM
- Oracle 12c 新特性 Active Data Guard Far SyncOracle
- oracle 12c 新特性之不可見欄位Oracle
- oracle 12C 新特性之臨時undo控制Oracle
- Oracle 12C 資料泵新特性測試Oracle
- 【12C】Oracle 12C 新特性“可插拔資料庫”功能體驗Oracle資料庫
- Oracle 12c叢集啟動故障Oracle
- Oracle NET 12c 新特性 (文件 ID 2102464.1)Oracle
- 開發者必讀:Oracle 12c新特性再總結Oracle
- Oracle 資料庫12c新特性總結(一)Oracle資料庫
- Oracle 12c新特性 - Active Data Guard功能增強Oracle