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: oracle-l Digest V3 #147

Re: oracle-l Digest V3 #147

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 23 May 2006 21:09:16 +0100
Message-ID: <004f01c67ea4$c4d2bf40$0300a8c0@Primary>

Roughly speaking:

  1. Oracle calculates the expected cardinality N of the final result and produces a fraction that represents your intention of returning 1/N of the rows - this would be 10/N, 100/N etc. if you used first_rows_10, first_rows_100.
  2. Given that you want 1/N th of the data, then you need only do 1/Nth of the driving table scan to get enough data in that step to continue to the next step. Allow for some rounding errors, and oddly placed 'plus 1'.

Regards

Jonathan Lewis
http://www.oracle.com/technology/community/oracle_ace/ace1.html#lewis

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

Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 23 2006 - 15:09:16 CDT

Original text of this message

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