Re: Planner question - "bit" data types

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Planner question - "bit" data types
Дата
Msg-id 4AA194E7.8010504@agliodbs.com
обсуждение исходный текст
Ответ на Planner question - "bit" data types  (Karl Denninger <karl@denninger.net>)
Ответы Re: Planner question - "bit" data types  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-performance
Karl,

> For reference, I was having SEVERE performance problems with the
> following comparison in an SQL statement where "mask" was an integer:
>
> "select ... from .... where ...... and (permission & mask = permission)"

AFAIK, the only way to use an index on these queries is through
expression indexes.  That's why a lot of folks use INTARRAY instead; it
comes with a GIN index type.

It would probably be possible to create a new index type using GiST or
GIN which indexed bitstrings automatically, but I don't know that anyone
has done it yet.

Changing your integer to a bitstring will not, to my knowledge, improve
this.

--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Seeking performance advice and explanation for high I/O on 8.3
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Planner question - "bit" data types