From: | "Zeugswetter Andreas DAZ SD" <ZeugswetterA(at)spardat(dot)at> |
---|---|
To: | <josh(at)agliodbs(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Cc: | "Chris Browne" <cbbrowne(at)acm(dot)org> |
Subject: | Re: plans for bitmap indexes? |
Date: | 2004-10-13 08:24:07 |
Message-ID: | 46C15C39FEB2C44BA555E356FBCD6FA40184D1E0@m0114.s-mxs.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > The most nearly comparable thing is be the notion of "partial
> > indexes," where, supposing you had 60 region codes (e.g. - 50 US
> > states, 10 Canadian provinces), you might set up indices thus:
> For example, imagine you have a table on a dating website with 18 columns
> representing 18 different characteristics for matching. Imagine that you
> index each of those columns seperately. If you do:
>
> SELECT * FROM people WHERE orientation = 'gay' AND gender = 'male' AND city =
> 'San Francisco';
I think bitmap indexes do have valid use cases, but partitioned indexes
are really a wonderful feature with a lot of use cases, maybe including this one.
Workable examples for useful partitioned indexes, that help here are:
create index people_male_ix on people (city) where gender = 'male';
create index people_gay_ix on people (city) where orientation = 'gay';
create index people_male_gay_ix on people (city) where gender = 'male' and orientation = 'gay';
Note, that the indexed column differs from the partitioning clause.
Note also, that the last index will perform way better than a combo of bitmap indexes.
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-10-13 10:21:08 | Re: more dirmod CYGWIN |
Previous Message | Neil Conway | 2004-10-13 08:12:33 | Re: plans for bitmap indexes? |