Skip to Main Content

Oracle Database Discussions

understand cost in explain plan

spur230Nov 7 2009 — edited Nov 8 2009
Hello Experts,

To my knowledge cost are cumulative of it child step. If so what is cost of ID 1 only 3 when its child (ID 2) is 11. Why isn't cost of ID1 sum of ID1 and ID2 which is 11+3?

Also the select statement ( ID 0) is only 11, why it is not 11+3? Please help me clarify?

Thanks is advance.
                                                                                                    
------------------------------------------------------------------------------------
| Id  | Operation                       |  Name            | Rows  | Bytes | Cost  |      
------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                |                  |     1 |    90 |    11 |      
|*  1 |  TABLE ACCESS BY INDEX ROWID    | CLM_HDR_CLM_LN_  |     1 |    31 |     3 |      
|   2 |   NESTED LOOPS                  |                  |     1 |    90 |    11 |      
|   3 |    NESTED LOOPS SEMI            |                  |     1 |    59 |     8 |      
|   4 |     NESTED LOOPS                |                  |     1 |    43 |     6 |      
|*  5 |      TABLE ACCESS BY INDEX ROWID| CLAIM_HEADER     |     1 |    12 |     3 |      
|*  6 |       INDEX UNIQUE SCAN         | XPKCLAIM_HEADER  |     1 |       |     2 |      
|*  7 |      TABLE ACCESS BY INDEX ROWID| CLM_HDR_CLM_LN_  |     1 |    31 |     3 |      
|*  8 |       INDEX RANGE SCAN          | TUNE_CAS_01      |     4 |       |     2 |      
|*  9 |     TABLE ACCESS BY INDEX ROWID | CLM_LN_X_FUND_D  |     1 |    16 |     2 |      
|* 10 |      INDEX RANGE SCAN           | XIF3CLM_LN_X_FU  |     1 |       |     1 |      
|  11 |    INLIST ITERATOR              |                  |       |       |       |      
|* 12 |     INDEX RANGE SCAN            | XAK1CLM_HDR_CLM  |     1 |       |     2 |      
------------------------------------------------------------------------------------      
This post has been answered by Jonathan Lewis on Nov 8 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 6 2009
Added on Nov 7 2009
8 comments
1,131 views