Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL tuning nightmare - db file sequential reads
On Thu, 06 Jul 2006 02:20:03 +0000, Mladen Gogala wrote:
> I'm not really
> sure what it does and how exactly does it affect CBO calculations.
Actually, this is a lie. I do know very well what it does, but my point is
that it
a) Isn't documented
b) FIRST_ROWS_N parameter affects mostly joins and is far from trivial.
This parameter <FIRST_ROWS_N> first computes the expected number of rows for the query, than calculates the percentage of the total number of rows which N represents. Then, the optimization is restarted and this percentage is applied to all the cardinalities in the query (histograms, statistics and alike).
Jonathan Lewis explained that to me in a private communication when I was asking questions about his book. Oracle didn't do such a good job documenting this. I hate using things which I do not understand. The only exception would be "beam me up Scottie" device which would rid me of @#$! I-95 in the morning. Unfortunately, I'm ready and willing, but the device is not available yet.
-- http://www.mgogala.comReceived on Wed Jul 05 2006 - 21:33:36 CDT
![]() |
![]() |