Home » RDBMS Server » Performance Tuning » Cost in the Explain Plan
Cost in the Explain Plan [message #216168] Thu, 25 January 2007 07:23 Go to next message
a_developer
Messages: 194
Registered: January 2006
Senior Member
The general conception is that when the Cost is lower then execution is faster. I have 2 explain plans for the same SQL statement. One has more Cost than the other but runs faster. When does this happen?? Why??..
Re: Cost in the Explain Plan [message #216190 is a reply to message #216168] Thu, 25 January 2007 08:38 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Make sure you are looking at the "real" explain plan, the one that was actually run, not the one the optimizer thought it would run under a current environment. You can capture the "real" plan with a 10046 trace.

Re: Cost in the Explain Plan [message #216873 is a reply to message #216168] Tue, 30 January 2007 14:18 Go to previous message
michael_bialik
Messages: 621
Registered: July 2006
Senior Member
There is only a week correlation between the cost and the actual execution time (IMHO - about 60-70%).
So the chances of getting query with higher run faster is quite big.

HTH.
Previous Topic: Performance Implications of a Generic Lookup Table Design
Next Topic: Group By
Goto Forum:
  


Current Time: Wed Nov 27 03:08:23 CST 2024