Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Which plan is better - what COST really means ?
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
>
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"
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Jan 13 2005 - 08:14:29 CST
![]() |
![]() |