|
Re: Importance of index unique scan (cost=0) [message #318629 is a reply to message #318593] |
Wed, 07 May 2008 06:20 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Are you sure your statistics are correct?
Reember that costs are just estimates, not an accurate predictor of absolute performance.
Also that even if an index scan only finds one row, it still must hit the table to get the rest of the data (in your example). BUT, then it must repeat that once for every time through the nested loop. So a one item index fetch that is fairly fast can all of a sudden be quite slow if repeated a million times.
Might want to run a 10046 trace and tkprof on it, and look in particular at the row source operation lines. Check those row counts against the estimated cardinalities in your explain plan. Does each and every step really only return one row?
|
|
|
|