|
最初由 QDZHT 发布
[B]感觉HJ的算法有问题,虽然Oracle认为NL的成本比HJ高,但实际上NL的速度的确比用HJ要快数十倍。
[/B]
If your Tar is still open with Oracle, ask them to give an explanation. What you quoted is nothing.
If you run through SQL trace, do the trace files show plans consistent with the 10053 trace? In the case of hash join, after you run the query, can you find out if it indeed uses one-pass hash join? You can check v$sql_workarea or perhaps check the value of 'workarea executions - onepass' in v$sesstat. Or simply watch v$tempstat for I/O. It should show no increment.
If you suspect hash join calculation underestimates the cost, Oracle needs to explain how the one partition cost 438 is calculated. Jonathan Lewis's CBO book p.381 has a sample calculation. I need your db_block_size to apply his formula.
Yong Huang |
|