Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Index question ???
First off, a disclaimer.
It's late, and I'm tired, and my soon to be martini is beckoning.
So I'm worn out, and anxious.
Remember, this advice is a free service. :)
Forget the 4% number. It's meaningless. What you have to be concerned with is 'will using the index cause me to read more blocks than if I just do a full table scan?'.
tkprof and explain plan can help you with that.
Personally, I would build the index, analyze all tables and indexes, and build histograms for cases where I know the queried data is skewed, such as yours appears to be.
The point is, give the cost based optimizer all the information it needs, and let it sort it out.
Jared
On Tuesday 14 August 2001 13:41, Janet Linsy wrote:
> Hi all,
>
> According to Oracle's doc, for a table > 1000 rows, if
> the query returns < 4% of the data, an index can be
> built.
>
> If I have a table, with ID 1,2, 3 return < 4% of the
> row, but ID 4, 5, 6 returns > 4% rows. Should I build
> an index on ID column?
>
> Also you know any general guildlines for building, not
> building indexes? OEM generates suggestions too,
> should I follow?
>
> Thanks you!
>
> Janet
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jared Still 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 Aug 15 2001 - 00:29:13 CDT
![]() |
![]() |