Home » RDBMS Server » Performance Tuning » execution time versus plan cost (10.2.0.4)
execution time versus plan cost [message #453711] Fri, 30 April 2010 06:42 Go to next message
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 Go to previous messageGo to next message
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

Re: execution time versus plan cost [message #453725 is a reply to message #453711] Fri, 30 April 2010 07:14 Go to previous message
cookiemonster
Messages: 13923
Registered: September 2008
Location: Rainy Manchester
Senior Member
To put it another way:
Costs are estimates of how much work oracle thinks it needs to do to execute the query. Sometimes those estimates are wrong.
Previous Topic: Updating a huge table of size 750Gb
Next Topic: Interpreting tuning task Report
Goto Forum:
  


Current Time: Sun May 19 21:57:12 CDT 2024