Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Diff. between FIRST_ROWS and INDEX hint - is there any?
FIRST_ROWS would seem to imply just that: return the first row to me as fast as possible. The optimizer will do this via indexes, hash joins, full table scan, anti joins, whatever it deems to be the fastest. The methods I mentioned may not even be considered by the optimizer, I am not privy to its internals.
The INDEX hint ( without specifying an index ) will consider all of the indexes, choose one, or maybe even merge the results from several indexes. It will not even consider doing a full table scan.
This is all available of course, in the 'Tuning for Performance' Oracle manual.
Jared
On Tue, 20 Feb 2001, dana mn wrote:
>
> Is there any difference between the FIRST_ROWS hint
> (which is said to "generally force the use of indexes" - Niemiec)
> and the use of the INDEX hint (without specifying a particular
> index)?
>
> Is something else going on behind the scenes with FIRST_ROWS or is this
> gratuitous bloat that shouldn't be in the optimizer? (or a placeholder
> for future innovation)?
>
> Thanks very much.
>
> - Dana
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: dana mn
> INET: danamn2000_at_yahoo.com
>
> 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).
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: jkstill_at_cybcon.com 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 Wed Feb 21 2001 - 14:26:02 CST