From oracle-l-bounce@freelists.org  Mon Oct 10 06:11:05 2005
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air891.startdedicated.com (root@localhost)
 by orafaq.com (8.12.10/8.12.10) with ESMTP id j9ABB5cw009183
 for <oracle-l@orafaq.com>; Mon, 10 Oct 2005 06:11:05 -0500
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j9ABB2vX009171
 for <oracle-l@orafaq.com>; Mon, 10 Oct 2005 06:11:02 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 9AB851FA0BA;
 Mon, 10 Oct 2005 06:10:59 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 00602-05; Mon, 10 Oct 2005 06:10:59 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1C5FD1FA0C6;
 Mon, 10 Oct 2005 06:10:59 -0500 (EST)
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by Ecartis
Subject: RE: Bitmap Index
Date: Mon, 10 Oct 2005 13:09:02 +0200
Message-ID: <F2C9CCA71510B442AF71446CAE8AEBAF134598@MSXVS04.trivadis.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Bitmap Index
Thread-Index: AcXNg88q26KsIc41R1+DrSIbpG0+GwABiDpQ
From: "Christian Antognini" <Christian.Antognini@trivadis.com>
To: <oracle.tutorials@gmail.com>
Cc: <oracle-l@freelists.org>
X-OriginalArrivalTime: 10 Oct 2005 11:09:02.0255 (UTC) FILETIME=[054603F0:01C5CD8B]
X-archive-position: 26621
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: Christian.Antognini@trivadis.com
Precedence: normal
Reply-To: Christian.Antognini@trivadis.com
X-list: oracle-l
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net
X-mailscan-MailScanner-Information: Please contact the ISP for more information
X-mailscan-MailScanner: Found to be clean
X-MailScanner-From: oracle-l-bounce@freelists.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on 
 air891.startdedicated.com
X-Spam-Level: 
X-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
 version=2.63

Deepak

>In my DWH DB I have a table with few million rows.
>I have a column in the table having 15 distinct
>values. That column is being used in the where 
>clause of the queries. What I am interested to know
>is would it be beneficial to create a bitmap index 
>on it.

As usually it depends... What does "used" mean? (e.g. equality or inequality) Do you have other restrictions in your WHERE clause? Which is the distribution of the 15 values?

As already suggested by Shiva list partitioning (or even other types as well...) could be a better solution than indexing.

>Is there any specific ratio (distincy values)/(Num of rows) 
>at which one must consider creating bitmap indexes rather 
>than b-tree indexes?

The choice between bitmap and b-tree indexes is not influenced by something like "(distincy values)/(Num of rows)". It only depends on the application's requirements!


HTH
Chris

New Features Oracle Database 10g Release 2 seminars @ www.trivadis.com
Italiano: Lugano (24-Nov)
Français: Genève (17-Nov)
Deutsch: Hamburg (13-Oct), München (20-Oct), Basel (25-Oct), Frankfurt (27-Oct), 
         Bern (8-Nov), Düsseldorf (23-Nov), Zürich (29-Nov), Stuttgart (13-Dec)
--
http://www.freelists.org/webpage/oracle-l

