Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NL join cost calculated?

user1980Nov 2 2008 — edited Nov 2 2008
Hi,

This is the trace of 10053 event trace
Join order[1]:  DEPT[D]#0  EMP[E]#1
Now joining: EMP[E]#1 *******
NL Join
  Outer table: cost: 1  cdn: 4  rcz: 3  resp:  1
  Inner table: EMP  Alias: E
    Access Path: table-scan  Resc: 2
    Join:  Resc:  7  Resp:  7
  Best NL cost: 7  resp: 7
Join cardinality:  14 = outer (4) * inner (14) * sel (2.5000e-001)  [flag=0]
I would like to know how the NL join cost is 7?.

I thougth the NL join cost formula was:
join cost = cost of accessing outer table + ( cardinality of outer table * cost of accessing inner table )
The above formula should yield:

NL join cost = 1 + 4(cdn) * 2(Resc)
NL join cost = 9

How is the value of 7 for "Best NL cost" got?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2008
Added on Nov 2 2008
2 comments
354 views