Re: Indexes with few values

From: David Ng <david_ng_at_mindlink.bc.ca>
Date: 1996/11/17
Message-ID: <3290137C.1C0A_at_mindlink.bc.ca>#1/1


Hui, Kwok Miu wrote:
>
> Mats Larsson wrote:
> > Suppose I have a table where one of the columns has only three
> > different values :
 

> > If I want to search for rows with the value 'N' then an index would help
> > wouldn't it ?
>
> If you are using Oracle7.3 and the index is bitmapped one, it will help
> you great;
> otherwise, normal index will do no help to you.
>
> --
> Hui, Kwok Miu (Xu, Guo Miao) E-Mail: huikomix_at_dt.com.hk
> Oracle DBA & Unix Administrator Tel : (00852)2589 3369
> Cho Yang (Hong Kong) Co., Ltd. Fax : (00852)2559 3049

If those value are distrubuted evenly, DO NOT create index. That does not justfy ! The guideline is that no index should be used if result set is larger than 15%. In other word, column with values less than 7, the chance is that index does not help.

Many developers think indexes always help. In fact, I kill a lot of indexes in some database to gain performance in my application tuning jobs. ( I am not kidding. )

David Ng Received on Sun Nov 17 1996 - 00:00:00 CET

Original text of this message