Re: Question on how cardinality is calculated.

From: Jonathan Lewis <>
Date: Thu, 10 Jan 2008 16:22:20 -0000
Message-ID: <01fb01c853a4$f9e78220$0200a8c0@Primary>

5% of num_rows


Jonathan Lewis

Author: Cost Based Oracle: Fundamentals

The Co-operative Oracle Users' FAQ

  • Original Message ----- From: "Ronnie Doggart" <> To: <> Sent: Thursday, January 10, 2008 3:06 PM Subject: Question on how cardinality is calculated.


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

-- Received on Thu Jan 10 2008 - 10:22:20 CST

Original text of this message