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