Re: Indexes on low cardinality columns

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Indexes on low cardinality columns
Дата
Msg-id 407d949e0910161827wb9e7e4cyd25faae8d895a74e@mail.gmail.com
обсуждение исходный текст
Ответ на Indexes on low cardinality columns  (Vikul Khosla <vkhosla@gridsolv.com>)
Ответы Re: Indexes on low cardinality columns  (Vikul Khosla <vkhosla@gridsolv.com>)
Re: Indexes on low cardinality columns  (Vikul Khosla <webmaster@gridsolv.com>)
Список pgsql-performance
On Fri, Oct 16, 2009 at 4:36 PM, Vikul Khosla <vkhosla@gridsolv.com> wrote:
> In Oracle, we replaced the B-Tree Indexes with Bitmap indexes and saw
> performance go
> through the roof. I know Postgres does not have Bitmap indexes,
> but is there a reasonable alternative to boost performance in situations
> where low cardinality
> columns are involved ?

Do you need to query on all of the 3,000 values?

If it's just particular values which are common i would suggest using
partial indexes on some other column with a where clause restricting
them to only one value in the low-cardinality column. But I wouldn't
want to have 3,000 indexes.

Alternately you could try partitioning the table, though 3,000
partitions is a lot too. If you often update this value then
partitioning wouldn't work well anyways (but then bitmap indexes
wouldn't have worked well in oracle either)

--
greg

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

Предыдущее
От: Vikul Khosla
Дата:
Сообщение: Indexes on low cardinality columns
Следующее
От: decibel
Дата:
Сообщение: Re: UUID as primary key