View Single Post

   
  #5 (permalink)  
Old 02-26-2008, 07:25 AM
ciapecki
 
Posts: n/a
Default Re: indexing a column with only 2 or 3 values

On 3 Aug., 10:03, Thomas Kellerer <JUAXQOSZF...@spammotel.com> wrote:
> ciapecki wrote:
> > On 3 Aug., 09:54, Thomas Kellerer <JUAXQOSZF...@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/c...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

Reply With Quote