ORACLE 12C In-Memory效能測試

來源:互聯網
上載者:User

標籤:

1、查看oracle版本

SQL> select * from v$version;BANNERCON_ID------------------------------------------------------------------------------------------ ----------Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production0PL/SQL Release 12.1.0.2.0 - Production0CORE12.1.0.2.0Production0TNS for Linux: Version 12.1.0.2.0 - Production0NLSRTL Version 12.1.0.2.0 - Production0SQL> show pdbsCON_ID CON_NAMEOPEN MODE RESTRICTED---------- ------------------------------ ---------- ----------2 PDB$SEEDREAD ONLY NO3 PDB01READ WRITE NOSQL> alter session set container=pdb01;Session altered.SQL> show con_name;CON_NAME------------------------------PDB01

  

2、查看inmemory是否啟用

SQL> show parameter inmemoryNAMETYPEVALUE------------------------------------ ----------- ------------------------------inmemory_clause_default stringinmemory_forcestringDEFAULTinmemory_max_populate_serversinteger2inmemory_querystringENABLEinmemory_sizebig integer 208Minmemory_trickle_repopulate_servers_ integer1percentoptimizer_inmemory_awarebooleanTRUE

  

3、建立測試表

SQL> conn keven/kevenConnected.SQL> create table t1 as select * from dba_objects;SQL> create table t2 as select * from dba_objects;SQL> col table_name for a40SQL> select * from v$inmemory_area;POOLALLOC_BYTES USED_BYTES POPULATE_STATUSCON_ID-------------------------- ----------- ---------- -------------------------- ----------1MB POOL1667235844194304 DONE164KB POOL33554432131072 DONE1SQL> select table_name,INMEMORY,INMEMORY_PRIORITY,INMEMORY_DISTRIBUTE,INMEMORY_COMPRESSION,INMEMORY_DUPLICATE from user_tables;TABLE_NAMEINMEMORY INMEMORY INMEMORY_DISTRI INMEMORY_COMPRESS INMEMORY_DUPL---------------------------------------- -------- -------- --------------- ----------------- -------------T2DISABLEDT1ENABLED NONEAUTO FOR QUERY LOW NO DUPLICATEElapsed: 00:00:00.04SQL> set autot traceSQL> SQL> select * from t2;91040 rows selected.Elapsed: 00:00:01.22Execution Plan----------------------------------------------------------Plan hash value: 1513984157--------------------------------------------------------------------------| Id | Operation| Name | Rows | Bytes | Cost (%CPU)| Time|--------------------------------------------------------------------------| 0 | SELECT STATEMENT || 91040 | 9M| 426 (1)| 00:00:01 || 1 | TABLE ACCESS FULL| T2| 91040 | 9M| 426 (1)| 00:00:01 |--------------------------------------------------------------------------Statistics----------------------------------------------------------53 recursive calls0 db block gets7569 consistent gets1529 physical reads0 redo size12149139 bytes sent via SQL*Net to client67311 bytes received via SQL*Net from client6071 SQL*Net roundtrips to/from client4 sorts (memory)0 sorts (disk)91040 rows processedSQL> /91040 rows selected.Elapsed: 00:00:01.22Execution Plan----------------------------------------------------------Plan hash value: 1513984157--------------------------------------------------------------------------| Id | Operation| Name | Rows | Bytes | Cost (%CPU)| Time|--------------------------------------------------------------------------| 0 | SELECT STATEMENT || 91040 | 9M| 426 (1)| 00:00:01 || 1 | TABLE ACCESS FULL| T2| 91040 | 9M| 426 (1)| 00:00:01 |--------------------------------------------------------------------------Statistics----------------------------------------------------------0 recursive calls0 db block gets7497 consistent gets1529 physical reads0 redo size12149139 bytes sent via SQL*Net to client67311 bytes received via SQL*Net from client6071 SQL*Net roundtrips to/from client0 sorts (memory)0 sorts (disk)91040 rows processedSQL> alter table t2 inmemory;Table altered.Elapsed: 00:00:00.03SQL> select * from t2;91040 rows selected.Elapsed: 00:00:01.32Execution Plan----------------------------------------------------------Plan hash value: 1513984157-----------------------------------------------------------------------------------| Id | Operation| Name | Rows | Bytes | Cost (%CPU)| Time|-----------------------------------------------------------------------------------| 0 | SELECT STATEMENT|| 91040 |9M| 20 (20)| 00:00:01 || 1 | TABLE ACCESS INMEMORY FULL| T2 | 91040 |9M| 20 (20)| 00:00:01 |-----------------------------------------------------------------------------------Statistics----------------------------------------------------------9 recursive calls0 db block gets7507 consistent gets1529 physical reads0 redo size4980841 bytes sent via SQL*Net to client67311 bytes received via SQL*Net from client6071 SQL*Net roundtrips to/from client2 sorts (memory)0 sorts (disk)91040 rows processedSQL> /91040 rows selected.Elapsed: 00:00:01.12Execution Plan----------------------------------------------------------Plan hash value: 1513984157-----------------------------------------------------------------------------------| Id | Operation| Name | Rows | Bytes | Cost (%CPU)| Time|-----------------------------------------------------------------------------------| 0 | SELECT STATEMENT|| 91040 |9M| 32 (16)| 00:00:01 || 1 | TABLE ACCESS INMEMORY FULL| T2 | 91040 |9M| 32 (16)| 00:00:01 |-----------------------------------------------------------------------------------Statistics----------------------------------------------------------0 recursive calls0 db block gets3 consistent gets0 physical reads0 redo size4980841 bytes sent via SQL*Net to client67311 bytes received via SQL*Net from client6071 SQL*Net roundtrips to/from client0 sorts (memory)0 sorts (disk)91040 rows processed

結論:這裡我們可以發現,使用了In-Memory功能之後,資料庫consistent gets為3,相比未使用In-Memory特性之前7507,效能提升明顯。

ORACLE 12C In-Memory效能測試

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.