首页 > 数据库 > Oracle > 使用RESULT CACHE加速SQL查询效率
点击(此处)折叠或打开
点击(此处)折叠或打开
Execution Plan
----------------------------------------------------------
Plan hash value: 3529668017
--------------------------------------------------------------------------------
----------------------------
| Id | Operation | Name | Rows | Byt
es | Cost (%CPU)| Time |
--------------------------------------------------------------------------------
----------------------------
| 0 | SELECT STATEMENT | | 8503 | 1
49K| 1738 (1)| 00:00:21 |
| 1 | RESULT CACHE | 6bhrdwm7rcqr486gmz2qc71h5m | |
| | |
| 2 | TABLE ACCESS BY INDEX ROWID | SALES | 8503 | 1
49K| 1738 (1)| 00:00:21 |
| 3 | BITMAP CONVERSION TO ROWIDS| | |
| | |
|* 4 | BITMAP INDEX RANGE SCAN | SALES_TIME_BIX | |
| | |
--------------------------------------------------------------------------------
----------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
4 - access("TIME_ID">=TO_DATE(' 2000-01-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss
') AND
"TIME_ID"<=TO_DATE(' 2000-01-03 00:00:00', 'syyyy-mm-dd hh24:mi:ss
'))
Result Cache Information (identified by operation id):
------------------------------------------------------
1 - column-count=2; dependencies=(SH.SALES); attributes=(ordered); parameters
=(nls); name="select /*+ RESULT_CACHE */ prod_id,cust_id from sales where time_i
d between to_date('2000-01-01', 'YYYY-MM-DD') and to_date('200"
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
63782 bytes sent via SQL*Net to client
2613 bytes received via SQL*Net from client
192 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
2854 rows processed
点击(此处)折叠或打开
ID TYPE STATUS
---------- -------------------- ------------------
NAME
--------------------------------------------------------------------------------
0 Dependency Published
SH.SALES
19 Result Published
select /*+ RESULT_CACHE */ prod_id,cust_id from sales where time_id between to_d
ate('2000-01-01', 'YYYY-MM-DD') and to_date('200
1 Result Invalid
SELECT /* DS_SVC */ /*+ dynamic_sampling(0) no_sql_tune no_monitoring optimizer_
ID TYPE STATUS
---------- -------------------- ------------------
NAME
--------------------------------------------------------------------------------
features_enable(default) opt_param('parallel_exe
2 Result Invalid
SELECT /* DS_SVC */ /*+ dynamic_sampling(0) no_sql_tune no_monitoring optimizer_
features_enable(default) opt_param('parallel_exe
点击(此处)折叠或打开
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22621861/viewspace-2087899/ ,如需转载,请注明出处,否则将追究法律责任。