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: Why CBO choose wrong way?

Re: Why CBO choose wrong way?

From: Connor McDonald <mcdonald.connor_at_gmail.com>
Date: Sat, 28 May 2005 21:21:02 +0800
Message-ID: <5e30486205052806216ced12df@mail.gmail.com>


A similar example at http://www.oracledba.co.uk/tips/9i_first_rows.htm

hth
connor

On 5/28/05, Zhai Jingmin <zhai_jingmin_at_yahoo.com> wrote:
> I changed optimizer_mode to 'first_rows_1',and my query can use the right=

 index too!I never thought there's so much difference between 'first_rows' =
and 'first_rows_1' before this query problem,I checked the oracle manuels,f=
ound following words,please note the 'Note',hope anyone like me note this b=
ig difference.Thanks a lot for Lex's notification.
>=20

> FIRST_ROWS_n

>=20
> The optimizer uses a cost-based approach, regardless of the presence of s=
tatistics, and optimizes with a goal of best response time to return the fi= rst n number of rows; n can equal 1, 10, 100, or 1000.
>=20

> FIRST_ROWS

>=20
> The optimizer uses a mix of cost and heuristics to find a best plan for f=
ast delivery of the first few rows.
>=20
> Note: Using heuristics sometimes leads the query optimizer to generate a =
plan with a cost that is significantly larger than the cost of a plan witho= ut applying the heuristic. FIRST_ROWS is available for backward compatibili= ty and plan stability; use FIRST_ROWS_n instead. >=20

--=20
Connor McDonald
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D
email: connor_mcdonald_at_yahoo.com
web: http://www.oracledba.co.uk

"Semper in excremento, sole profundum qui variat"

--
http://www.freelists.org/webpage/oracle-l
Received on Sat May 28 2005 - 09:25:52 CDT

Original text of this message

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