Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Bitmap Index Problem
On Wed, 13 Sep 2000 17:33:58 GMT, wax_man_at_my-deja.com wrote:
>I'm having a problem with a bitmap partition index. I have a large
>table (~500M rows) that is split into ~56 partitions. The partitions
>are split on a column called snapshot_month which is a number that is
>equiv of yyyymm.
>
>Anyway, if I run a query like:
>
>select * from table where snapshot_month=200006;
>
>the explain plan states that it is doing a full table scan.
>
>However, if I do a query like:
>
>select * from table where snapshot_month in (200006,200007);
>
>then the explain plan seems to say that it is using the bitmap index.
>
>Why is it not using it on the first query? Since it should provide a
>direct hit against an index that at the most will return 1/56 of the
>table, it seems that it should be using it.
>
I would have thought what is actually happening is a full scan of the
relevant partition. As you have explicitly stated a specific partition
key, in the first query, it can partition prune all but one partition.
In the second query the optimiser must think the BM index is the best
option.
Received on Sat Sep 16 2000 - 15:43:03 CDT
![]() |
![]() |