Question on how cardinality is calculated.

  • From: "Ronnie Doggart" <ronnie_doggart@xxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 10 Jan 2008 15:06:05 -0000

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


The information in this message is confidential and may be legally privileged. 
It is intended solely for the addressee. Access to this message 
by anyone else is unauthorised. If you are not the intended recipient, any 
disclosure, copying, or distribution of the message, or any action 
or omission taken by you in reliance on it, is prohibited and may be unlawful. 
Please immediately contact the sender if you have received this 
message in error. 

The views and opinions expressed in this email may not reflect the views and 
opinions of any member of Lagan Technologies Limited, or any of its
subsidiaries. Lagan Technologies Limited is a company registered in Northern 
Ireland with registration number NI 28773. The registered office of 
Lagan Technologies Limited is 209 Airport Road West, Belfast, Co. Antrim, BT3 
9EZ.


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


Other related posts: