Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Which plan is better - what COST really means ?

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

From: Connor McDonald <hamcdc_at_yahoo.co.uk>
Date: Thu, 13 Jan 2005 14:16:23 +0000 (GMT)
Message-ID: <20050113141623.8363.qmail@web86909.mail.ukl.yahoo.com>


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 perfect...it would need to have up-to-date stats for every permutation of column/table/join for every possible query...Thats a lot of stats!

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

hth
connor

> 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 9.2.0.4/AIX5.2L.
>
> Thanks in advance.
>
> Regards,
> Prem.
> --
> http://www.freelists.org/webpage/oracle-l
>



Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions" ISBN: 1590592174 web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com

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. http://info.mail.yahoo.com/mail_250
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 13 2005 - 08:14:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US