oracle12c R2 in memory

查看参数设置

SQL> show parameter inmemory

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
inmemory_adg_enabled                   boolean     TRUE
inmemory_clause_default                string
inmemory_expressions_usage         string      ENABLE
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
inmemory_virtual_columns             string      MANUAL
optimizer_inmemory_aware             boolean     TRUE

参数inmemory_size,指定可以作为内存列存的内存

SQL> alter system set inmemory_size=800M cope=spfile;

inmemory_max_populate_servers 用于将数据加载到内存的后台进程数量

SQL> alter system set inmemory_max_populate_servers=2;

SQL> show sga

Total System Global Area 1543503872 bytes
Fixed Size                  8793112 bytes
Variable Size             570426344 bytes
Database Buffers          117440512 bytes
Redo Buffers                7983104 bytes
In-Memory Area            838860800 bytes

验证:

SQL> select * from zxq;

72633 rows selected.


Execution Plan
----------------------------------------------------------
Plan hash value: 3272699641

--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      | 72633 |  9433K|   396   (1)| 00:00:01 |
|   1 |  TABLE ACCESS FULL| ZXQ  | 72633 |  9433K|   396   (1)| 00:00:01 |
--------------------------------------------------------------------------


Statistics
----------------------------------------------------------
          0  recursive calls
          5  db block gets
       6176  consistent gets
          0  physical reads
          0  redo size
   11079730  bytes sent via SQL*Net to client
      53869  bytes received via SQL*Net from client
       4844  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
      72633  rows processed

内存话处理:

SQL> alter table zxq inmemory;

Table altered.

SQL>  select * from zxq;

72633 rows selected.


Execution Plan
----------------------------------------------------------
Plan hash value: 3272699641

-----------------------------------------------------------------------------------
| Id  | Operation                  | Name | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------
|   0 | SELECT STATEMENT           |      | 72633 |  9433K|    21  (29)| 00:00:01 |
|   1 |  TABLE ACCESS INMEMORY FULL| ZXQ  | 72633 |  9433K|    21  (29)| 00:00:01 |
-----------------------------------------------------------------------------------


Statistics
----------------------------------------------------------
          0  recursive calls
          3  db block gets
          9  consistent gets
          0  physical reads
          0  redo size
    4836448  bytes sent via SQL*Net to client
      53869  bytes received via SQL*Net from client
       4844  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
      72633  rows processed

查看内存区域的使用情况

SQL> select * from V$INMEMORY_AREA;

POOL                       ALLOC_BYTES USED_BYTES POPULATE_STATUS                CON_ID
-------------------------- ----------- ---------- -------------------------- ----------
1MB POOL                     670040064    4194304 DONE                                5
64KB POOL                    150994944     262144 DONE                                5
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值