Re: Question on how cardinality is calculated.
- From: "K Gopalakrishnan" <kaygopal@xxxxxxxxx>
- To: ronnie_doggart@xxxxxxxxx
- Date: Thu, 10 Jan 2008 10:21:46 -0600
Ronnie,
It is always better to include the version details whenever you are
looking for some CBO specifics. Do you see the num_rows as 111K for
table_1 in the dba_tables?
-Gopal
On Jan 10, 2008 9:06 AM, Ronnie Doggart <ronnie_doggart@xxxxxxxxx> wrote:
> All
>
> Does anyone know how Oracle calculates the cardinality of a query such
> as:
>
> Select * from table_1 where upper(case) like '%12345%';
>
> Execution Plan
> ----------------------------------------------------------
> 0 SELECT STATEMENT Optimizer=CHOOSE (Cost=131 Card=5553
> Bytes=621936)
> 1 0 TABLE ACCESS (FULL) OF 'TABLE_1' (Cost=131 Card=5553
> Bytes=621936)
>
> Oracle calculates that it is expecting 5553 rows from this query but I
> know it will only return 2.
>
> How does it do its estimate ?
>
>
>
> Ronnie Doggart
>
--
http://www.freelists.org/webpage/oracle-l
- References:
- Question on how cardinality is calculated.
- From: Ronnie Doggart
Other related posts:
- » Question on how cardinality is calculated.
- » Re: Question on how cardinality is calculated.
- » Re: Question on how cardinality is calculated.
- » RE: Question on how cardinality is calculated.
- » RE: Question on how cardinality is calculated.
- » Re: Question on how cardinality is calculated.
- » RE: Question on how cardinality is calculated.
- Question on how cardinality is calculated.
- From: Ronnie Doggart