Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Bitmap or B-Tree indexes...?
Aftermath Fan wrote:
> Hi,
>
> I have a table with about 120 million rows. I'd like to index two
> columns. Column id1 has about 15,000 distinct values; column id2 has
> about 600,000. Most of the queries are:
>
> select <something> from <table> where id1 = ?
> select <something> from <table> where id2 = ?
> select <something> from <table> where id1 = ? and id2 = ?
>
> I'm thinking for id1, the column with 15,000 values, a bitmap index
> would be appropriate given its low relative cardinality. And for id2
> and (id1,id2) a B-tree index.
>
> Just looking for a sanity check...thanks.
I'm thinking an explain plan created with DBMS_XPLAN would be the first step. Well that and a version number. ;-)
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Fri Jan 12 2007 - 14:21:25 CST
![]() |
![]() |