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: Wolfgang Breitling <breitliw_at_centrexcc.com>
Date: Thu, 13 Jul 2006 09:21:53 -0700
Message-ID: <1152807713.44b67321eaa82@webmail.hosting.telus.net>


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.

-- 
regards

Wolfgang Breitling
Oracle 7,8,8i,9i OCP DBA
Centrex Consulting Corporation
www.centrexcc.com

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jul 13 2006 - 11:21:53 CDT

Original text of this message

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