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: Vagaries of the CBO: Out-of-Range Predicates

Re: Vagaries of the CBO: Out-of-Range Predicates

From: Anand Rao <panandrao_at_gmail.com>
Date: Tue, 19 Dec 2006 07:02:02 +0530
Message-ID: <d70710370612181732s18563dc5p2641e83ee097c0ec@mail.gmail.com>


Hi,

Thanks Wolfgang, you are right i got a bit entangled in the terminology and hence ended up formulating a wrong question.

Yes, selectivity is what i should be worried about and ultimately the cost factor. because, i my case CBO is choosing the wrong index due to the NDV being 1 and i don't have histograms.

so, looks like i have resign myself to the fact that an NDV hack is the only way to make CBO choose the right index (without hinting the query).

many thanks,
anand

On 18/12/06, Wolfgang Breitling <breitliw_at_centrexcc.com> wrote:
>
> At 12:11 AM 12/18/2006, Anand Rao wrote:
>
> adding one more question,
>
> 3) How does CBO calculate the density in cases of bind variables when the
> value is out of range?
>
> or is this a RTFM / RTFB ... ??
>
>
> density is a "property" of the column and is roughly related to the
> probability of finding a particular value in the rows of the table. It is
> calculated when statistics are collected, *not* at parse time. density is
> in no way dependent on bind variables - or literals for that matter. You may
> be mistaking density with selectivity.
>
> Regards
>
> Wolfgang Breitling
> Centrex Consulting Corporation
> www.centrexcc.com
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Dec 18 2006 - 19:32:02 CST

Original text of this message

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