我在oracle中有一個查詢,導致OLAP系統中的估計成本很高。估計的行數只有100K,但成本是一個巨大的數字。我想知道如何計算成本的數量,以及在哪種情況下會出現超高估計成本?「TABLE ACCESS BY LOCAL INDEX ROWID」估計成本高
執行計劃:
17 TABLE ACCESS BY LOCAL INDEX ROWID /BIC/FZ3PM_C01
| (Estim. Costs = 1,299,922,942,955,190 , Estim. #Rows = 104,711)
| Pstart: 1 Pstop: 471
| Estim. CPU-Costs = 18,446,744,073,709,601,000 Estim. IO-Costs = 86,157,375,
|
--- 16 BITMAP CONVERSION TO ROWIDS
|
--- 15 BITMAP AND
|
|-- 7 BITMAP MERGE
| |
| --- 6 BITMAP KEY ITERATION
| |
| |-- 4 BUFFER SORT
| | |
| | ------3 TABLE ACCESS FULL /BIC/DZ3PM_C012
| | (Estim. Costs = 4 , Estim. #Rows = 180)
| | Estim. CPU-Costs = 1,093,126 Estim. IO-Costs = 4
| | Filter Predicates
| |
| ------5 BITMAP INDEX RANGE SCAN /BIC/FZ3PM_C01~050
| Pstart: 1 Pstop: 471
| Search Columns: 1
| Access Predicates
|
--- 14 BITMAP MERGE
|
--- 13 BITMAP KEY ITERATION
|
|-- 11 BUFFER SORT
| |
| --- 10 HASH JOIN
| | (Estim. Costs = 2,492 , Estim. #Rows = 1,264,100)
| | Estim. CPU-Costs = 801,483,146 Estim. IO-Costs = 2,407
| | Access Predicates
| |
| |-----8 TABLE ACCESS FULL /BI0/XMATERIAL
| | (Estim. Costs = 1,470 , Estim. #Rows = 50,880)
| | Estim. CPU-Costs = 403,451,418 Estim. IO-Costs = 1,427
| | Filter Predicates
| ------9 TABLE ACCESS FULL /BIC/DZ3PM_C011
| (Estim. Costs = 1,007 , Estim. #Rows = 1,264,100)
| Estim. CPU-Costs = 259,249,328 Estim. IO-Costs = 980
|
------12 BITMAP INDEX RANGE SCAN /BIC/FZ3PM_C01~040
Pstart: 1 Pstop: 471
Search Columns: 1
Access Predicates
'9 TABLE ACCESS FULL/BIC/DZ3PM_C011 | (估計費用= 1,007,估計#行數= 1,264,100)' –