Re: Bitmap indexes?

From: Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: Greg Copeland <greg(at)CopelandConsulting(dot)Net>, PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bitmap indexes?
Date: 2002-03-19 21:30:36
Message-ID: Pine.LNX.4.33.0203192118140.29494-100000@sphinx.mythic-beasts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 19 Mar 2002, Oleg Bartunov wrote:

Sorry to reply over you, Oleg.

> On 13 Mar 2002, Greg Copeland wrote:
>
> > One of the reasons why I originally stated following the hackers list is
> > because I wanted to implement bitmap indexes. I found in the archives,
> > the follow link, http://www.it.iitb.ernet.in/~rvijay/dbms/proj/, which
> > was extracted from this,
> > http://groups.google.com/groups?hl=en&threadm=01C0EF67.5105D2E0.mascarm%40mascari.com&rnum=1&prev=/groups%3Fq%3Dbitmap%2Bindex%2Bgroup:comp.databases.postgresql.hackers%26hl%3Den%26selm%3D01C0EF67.5105D2E0.mascarm%2540mascari.com%26rnum%3D1, archive thread.

For every case I have used a bitmap index on Oracle, a
partial index[0] made more sense (especialy since it
could usefully be compound).

Our troublesome case (on Oracle) is a table of "events"
where maybe fifty to a couple of hundred are "published"
(ie. web-visible) at any time. The events are categorised
by sport (about a dozen) and by "event type" (about five).
We never really query events except by PK or by sport/type/
published.

We make a bitmap index on "published", and trust Oracle to
use it correctly, and hope that our other indexes are also
useful.

On Postgres[1] we would make a partial compound index:

create index ... on events(sport_id,event_type_id)
where published='Y';

Matthew.

[0] Is this a postgres-only feature; my tame Oracle and
Sybase DBAs had never heard of such a thing, but
were rather impressed at the idea.
[1] Disclaimer. Our system doesn't run on PG, though I
do have a nearly equivalent prototype system which
does. I'd love to hear any success (or otherwise)
stories about PG partial indexes.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-03-19 22:09:17 Re: Domains and type coercion
Previous Message Tom Lane 2002-03-19 21:14:18 Domains and type coercion