execution time versus plan cost [message #453711] |
Fri, 30 April 2010 06:42 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
to my surprise i found some time if i try to tune my query and make some changes i found cost of the plan decreases drastically but the execution time increases.
How the cost of plan is related to execution time ?
|
|
|
Re: execution time versus plan cost [message #453714 is a reply to message #453711] |
Fri, 30 April 2010 06:47 |
Its_me_ved
Messages: 979 Registered: October 2009 Location: India
|
Senior Member |
|
|
My car runs faster now. Guess why!!!
We don't know what you wrote, we do not know what your data and we dont know what you modified !!!
Cost is alot more than CPU time. Keep in mind that the optimizer has to make split second descision about which way it wants to approach the query. The CBO builds a decision tree, estimating the costs of each possible execution plan. The costs are set by the CPU_cost or I/O_cost parameters. And the CBO estimates the costs, as best it can with the existing statistics. Yes, the costs are real, and a low cost should correlate to faster execution speed if you are using first rows optimizer mode. For all rows the costs optimizer server resources and the lowest cost should have the smallest resource usage.
Read the performance tuning sticky in this thread.
Regards,
Ved
[Updated on: Fri, 30 April 2010 06:53] Report message to a moderator
|
|
|
|