Re: Which plan is better - what COST really means ?

  • From: Connor McDonald <hamcdc@xxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 13 Jan 2005 14:16:23 +0000 (GMT)

Its a somewhat philosophical argument.

If the optimizer was perfect, the lowest cost would always be the fastest 
query, thats what the
cost is meant to signify.

But the optimizer can never be would need to have up-to-date stats 
for every
permutation of column/table/join for every possible query...Thats a lot of 

So lower cost is the optimizer's best attempt at telling you the best query


--- Prem Khanna J <premj@xxxxxxxxxxxxxx> wrote:

> Friends,
> when i have got two plans , how do i decide 
> which one is the best ?
> just read in asktom , that COST of a plan , 
> does not have any correspondence with response
> time of a query.
> i.e.,a query with higher COST than another
>  can be faster.
> if so , what in the execution plan does help 
> me to decide about a good (faster) plan ? 
> unless i execute it , can't i know it ? 
> is that the only way !!!
> Can someone throw light on this ?
> The environment is oracle
> Thanks in advance.
> Regards,
> Prem.
> --
> //

Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions"
ISBN: 1590592174

email: connor_mcdonald@xxxxxxxxx

Coming Soon! "Oracle Insight - Tales of the OakTable"

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, 
and...he will sit in a boat and drink beer all day"


Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less.

Other related posts: