Re: plans for bitmap indexes?

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas DAZ SD
Тема Re: plans for bitmap indexes?
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA40184D1E0@m0114.s-mxs.net
обсуждение исходный текст
Ответ на plans for bitmap indexes?  (Yann Michel <yann-postgresql@spline.de>)
Ответы Re: plans for bitmap indexes?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: plans for bitmap indexes?  (Josh Berkus <josh@agliodbs.com>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: plans for bitmap indexes?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: more dirmod CYGWIN