Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: indexing a column with only 2 or 3 values

Re: indexing a column with only 2 or 3 values

From: ciapecki <ciapecki_at_gmail.com>
Date: Fri, 03 Aug 2007 01:05:33 -0700
Message-ID: <1186128333.403137.252020@x40g2000prg.googlegroups.com>


On 3 Aug., 10:03, Thomas Kellerer <JUAXQOSZF..._at_spammotel.com> wrote:
> ciapecki wrote:
> > On 3 Aug., 09:54, Thomas Kellerer <JUAXQOSZF..._at_spammotel.com> wrote:
> >> ciapecki wrote:
> >>> Hi,
> >>> Does indexing a very big table (about 5Mio records) on the columnA
> >>> which can hold only values Y,N,<NULL> make sense?
> >> Yes, that's what bitmap indexes were made for.
>
> >> Thomas
>
> > Thanks Thomas,
>
> > Is there any rule when to use BMap and when BTree?
> > I know for a few values BMap, for many different ones BTree, but maybe
> > there is some mathematical equation that helps to determine which
> > Index is better.
>
> Apart from comparing execution plans, I suggest to read the relevant
> chapter in the concepts manual:
>
> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/sch...
>
> Quote:
> "If the number of distinct values of a column is less than 1% of the
> number of rows in the table, or if the values in a column are repeated
> more than 100 times, then the column is a candidate for a bitmap index."
>
> Thomas

this is great,

thanks a lot Thomas

chris Received on Fri Aug 03 2007 - 03:05:33 CDT

Original text of this message

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