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 - default no of rows

Re: CBO - default no of rows

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 14 Sep 2001 13:11:53 -0700
Message-ID: <F001.0038F598.20010914130300@fatcity.com>

!! Please do not post Off Topic to this List !!

Perhaps your best bet is to experiment with a 10053 trace. I have just done a couple of quick tests on 8.1.7 on NT4 with a 4K block size - set up two tables with indexes, no stats, and write SQL with the expectation of a hash join.

The results suggest that Oracle knows the HWM, and uses an estimated 100-byte row size to calculate the number of rows; 30 rows per value to estimate selectivity, and 5% as the target for a 'LIKE' clause.

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Host to The Co-Operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases

Screen saver or Life saver: http://www.ud.com Use spare CPU to assist in cancer research.

-----Original Message-----
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Date: 14 September 2001 11:02

|My question of the day is :-
|What value does the CBO use as a default number of rows for a table.
|
|Background: -
|
|We all know that if any tables in a query have been analyzed then CBO
is
|used for the query not RBO (couple of caveats I know but let's
continue).
|So if 3 tables are used in a query and table a has 500 rows
(analyzed) table
|b has 50 rows (never analyzed) and table c has 3500000 rows (never
analyzed)
|all things being equal then CBO is used but what values does the CBO
use for
|tables b or c to decide which execution plan is best.
|
|

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jonathan Lewis
  INET: jonathan_at_jlcomp.demon.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Sep 14 2001 - 15:11:53 CDT

Original text of this message

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