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: CBO Predicate selectivity

RE: CBO Predicate selectivity

From: Laimutis Nedzinskas <Laimutis.Nedzinskas_at_landsbanki.is>
Date: Thu, 13 Jul 2006 14:05:21 -0000
Message-ID: <5A8896FB2AFC5445A7DCFC5903CCA6B02CA30B@W03856.li01r1d.lais.net>


It depends.

In my case the num_rows was the most important string to pull.

It was not fts I was fightning, it was the wrong join order.

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of amit poddar Sent: 13. júlí 2006 13:51
To: breitliw_at_centrexcc.com
Cc: jonathan_at_jlcomp.demon.co.uk; oracle-l_at_freelists.org Subject: Re: CBO Predicate selectivity

Yes by changing num_rows we can get right cardinality.

But for single table access path oracle would still use a FTS.

Won't we have to adjust clustering factor and/or leaf_blocks of the index on that table to make the CBO use the index

amit

Wolfgang Breitling wrote:
> Quoting amit poddar <amit.poddar_at_yale.edu>:
>
>
>> Hi,
>>
>> "You say you can't change the query, so if you want to fake this
>> query, you probably need to use dbms_stats.set_table_stats to tell
>> Oracle that the table has a very small number of rows - but don't
>> change the block count - so that a properly calculated selectivity is
>> fooled into getting the right cardinality."
>>
>> Sorry for being dense, but how does changing num_rows change the
>> selectivity ?
>>
>>
>
> It doesn't. Note that Jonathan said "so that a properly calculated
> selectivity is fooled into getting the right cardinality" i.e. the
> selectivity calculation (5% or 5% of 5%) isn't changed but the
> resulting cardinality estimate (num_rows
> * selectivity) is.
>
>

--
http://www.freelists.org/webpage/oracle-l


Fyrirvari/Disclaimer
http://www.landsbanki.is/disclaimer
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jul 13 2006 - 09:05:21 CDT

Original text of this message

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