調整index 後,cost 降低?
SQL> select handler_id,end_time,rule_no from PA18CLM.T_DISPATCH_TASK_DETAIL where rownum <2;
HANDLER_ID END_TIME RULE_NO
------------------------------ ------------------- ---------------------------------
actjck-00014 11-07-2012 06:31:52
---> 為了調整效能,調整了該表上的一個索引。如下:
------------------------------ ------------------- ---------------------------------
actjck-00014 11-07-2012 06:31:52
---> 為了調整效能,調整了該表上的一個索引。如下:
CREATE INDEX PA18CLM.IND_T_TASK_DETAIL_TM_ID_RLNO ON PA18CLM.T_DISPATCH_TASK_DETAIL
(END_TIME,HANDLER_ID, END_TIME, RULE_NO)
(END_TIME,HANDLER_ID, END_TIME, RULE_NO)
調整為:
DROP INDEX PA18CLM.IND_T_TASK_DETAIL_TM_ID_RLNO;
create index PA18CLM.IND_T_TASK_DETAIL_TM_ID_RLNO2 on PA18CLM.T_DISPATCH_TASK_DETAIL (HANDLER_ID,END_TIME, RULE_NO)
tablespace PCISAUTOCLM_IDX
Compute Statistics;
tablespace PCISAUTOCLM_IDX
Compute Statistics;
++++++++++++++++++++++++++++++++++
執行計劃改變如下:
Plan for Before index changed. .default{font: 8pt "tahoma";color:#000080;} .header{font: 8pt "tahoma";color:#000000;} .noborder{border-style.:none; border-bottom:0;border-left:0;border-right:0; border-top:0;padding-left:2px;padding-right:2px;} .normalborder {border-top:none; border-left:none; border-right:none;border-bottom:none;padding-left:2px;padding-right:2px;}
Plan | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 INSERT STATEMENT CHOOSE Cost: 3,815 Bytes: 512 Cardinality: 4 IO Cost: 3,815 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 FILTER TO_DATE(:Z)<=TO_DATE(:Z) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 NESTED LOOPS Cost: 3,815 Bytes: 512 Cardinality: 4 IO Cost: 3,815 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 NESTED LOOPS Cost: 3,803 Bytes: 2,840 Cardinality: 40 IO Cost: 3,803 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 INDEX FULL SCAN CQMSDATA.PK_TCADU_USER_POSITION [Analyzed] Bytes: 156 Cardinality: 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 TABLE ACCESS BY INDEX ROWID PA18CLM.T_DISPATCH_TASK_DETAIL [Analyzed] Cost: 317 Bytes: 174 Cardinality: 3 IO Cost: 317 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 INDEX RANGE SCAN PA18CLM.IND_T_TASK_DETAIL_TM_ID_RLNO [Analyzed] "B"."END_TIME">=:Z AND "B"."HANDLER_ID"="C"."LOW_USER_NAME" AND "B"."END_TIME"<=:Z "B"."HANDLER_ID"="C"."LOW_USER_NAME" Cost: 1,050 Cardinality: 84,235 IO Cost: 1,050 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 TABLE ACCESS BY INDEX ROWID PA18CLM.T_DISPATCH_TASK [Analyzed] "A"."TASK_TACHE_ID"='23' AND ("B"."DEAL_FLAG"='7' OR "B"."DEAL_FLAG"='8') OR "A"."TASK_TACHE_ID"='6-d' AND ("B"."DEAL_FLAG"='7' OR "B"."DEAL_FLAG"='8') OR "A"."TASK_TACHE_ID"='34' AND ("B"."DEAL_FLAG"='28' OR "B"."DEAL_FLAG"='29' OR "B"."DEAL_FLAG"='3' OR "B"."DEAL_FLAG"='31' OR "B"."DEAL_FLAG"='8') OR "A"."TASK_TACHE_ID"='35' AND ("B"."DEAL_FLAG"='28' OR "B"."DEAL_FLAG"='29' OR "B"."DEAL_FLAG"='30' OR "B"."DEAL_FLAG"='8') OR "A"."TASK_TACHE_ID"='13' AND ("B"."DEAL_FLAG"='15' OR "B"."DEAL_FLAG"='29' OR "B"."DEAL_FLAG"='30' OR "B"."DEAL_FLAG"='31' OR "B"."DEAL_FLAG"='4' OR "B"."DEAL_FLAG"='9') OR "A"."TASK_TACHE_ID"='21' AND ("B"."DEAL_FLAG"='26' OR "B"."DEAL_FLAG"='8') OR "A"."TASK_TACHE_ID"='33' AND ("B"."DEAL_FLAG"='7' OR "B"."DEAL_FLAG"='8') Cost: 1 Bytes: 57 Cardinality: 1 IO Cost: 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 INDEX UNIQUE SCAN PA18CLM.PK_T_DISPATCH_TASK [Analyzed] "B"."TASK_NO"="A"."TASK_NO" Cardinality: 1 Plan for After index changed.
|
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22578826/viewspace-739923/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- OPTIMIZER_INDEX_CACHING & OPTIMIZER_INDEX_COST_ADJIndex
- Optimizer index_caching and Index_Cost_adj tuningIndex
- OPTIMIZER_INDEX_CACHING和OPTIMIZER_INDEX_COST_ADJIndex
- 引數 optimizer_index_cost_adjIndex
- [zt] OPTIMIZER_INDEX_CACHING和OPTIMIZER_INDEX_COST_ADJIndex
- 分析index降低索引層次Index索引
- OPTIMIZER_MODE、optimizer_index_cost_adjIndex
- optimizer_index_cost_adj引數的作用Index
- OPTIMIZER_INDEX_COST_ADJ與成本計算Index
- optimizer_index_cost_adj的測試 IIndex
- 蘋果調整App Store商店演算法以降低自身應用排名蘋果APP演算法
- 【轉】OPTIMIZER_INDEX_COST_ADJ與成本計算Index
- PostgreSQL安裝完成後,引數調整SQL
- optimizer_index_cost_adj和optimizer_index_caching對CBO的影響Index
- MySQL安裝後需要調整什麼(轉)MySql
- optimizer_index_caching和optimizer_index_cost_adj兩個引數說明Index
- Gamma調整GAM
- 系統盤datePicker、調整Nav後退按鈕位置調整,電話簡訊郵件分享
- Oracle效能調整之--DML語句效能調整Oracle
- 手工段管理表空間遷移後的調整
- Oracle效能最佳化調整--調整重做機制Oracle
- 網路調整——效能調整手冊和參考
- Oracle 10g(10.1.0.2)中的OPTIMIZER_INDEX_COST_ADJ(轉)Oracle 10gIndex
- oracle實驗記錄 (oracle b*tree index訪問Cost計算(1))OracleIndex
- Nginx調整(一)Nginx
- oracle 效能調整Oracle
- 調整策略工具
- 安裝MySQL後,需要調整的10個效能配置項MySql
- 安裝完 MySQL 後必須調整的 10 項配置MySql
- 安裝完MySQL後必須調整的10項配置MySql
- 引數Optimizer_index_cost_adj 對執行計劃的影響Index
- 調整分割槽後分割槽不見的資料找到方法
- gitlab伺服器IP調整後修改domian或ipGitlab伺服器
- oracle 線上調整redoOracle
- 字串的調整II字串
- MySQL引數調整MySql
- 資料塊調整
- AIX 調整時區AI