CLOB在隐式类型转换的时候,会消耗这么多的current mode read和 consistent read(同时也会引起db block change,db block gets 的飙升),也就是CPU飙升。 SQL drop table t_clob; SQL create table t_clob(id number,cb clob); SQL insert into t_clob values
CLOB在隐式类型转换的时候,会消耗这么多的current mode read和 consistent read(同时也会引起db block change,db block gets 的飙升),也就是CPU飙升。
SQL> drop table t_clob;
SQL> create table t_clob(id number,cb clob);SQL> set autotrace off
10046 trace的结果:
select *
from t_clob
where cb like ',4,'
or cb like ',16'
or cb like ',91'
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.01 0.00 0 7 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.01 0.01 0 16 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 3 0.03 0.01 0 23 0 0
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 61
Rows Row Source Operation
------- ---------------------------------------------------
0 TABLE ACCESS FULL T_CLOB (cr=16 pr=0 pw=0 time=12823 us)
select *
from t_clob
where ',' || cb like ',4'
or ',' || cb like ',16'
or ',' || cb like ',91'
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.03 0 7 15 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.21 0.20 0 9025 42027 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 3 0.21 0.24 0 9032 42042 0
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 61
Rows Row Source Operation
------- ---------------------------------------------------
0 TABLE ACCESS FULL T_CLOB (cr=9025 pr=0 pw=0 time=207946 us)