- Original Message -----
> Date: Mon, 22 May 2006 14:27:56 +0200 (MEST)
> From: "Milen Kulev" <makulev_at_gmx.net>
> Subject: RE: 54 is less than 4 for CBO ?
>
> In the 10053 event file I see the following lines (with
> optimizer_mode=FIRST_ROWS_1)
> First K Rows: K/N ratio = 0,000001091131285, qbc=11020ea80
> First K Rows: Setup end
>
>
>
> And now the next bacth of questions (conserning "alter session set
> optimizer_mode=FIRST_ROWS_1" ):
>
> 1)Where the digit
> First K Rows: K/N ratio = 0,000001091131285, qbc=11020ea80
> is coming from ?
>
> 2) Why the FTS cost on T_FZG_SA is only 2 ? How this value is calculated
>
Roughly speaking:
- 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.
- 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