Re: BUG #1510: Indexes on boolean fields

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1510: Indexes on boolean fields
Дата
Msg-id 12059.1109522974@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1510: Indexes on boolean fields  ("Sergey Koshcheyev" <sergey.p.k@gmail.com>)
Список pgsql-bugs
"Sergey Koshcheyev" <sergey.p.k@gmail.com> writes:
> this is an addition to my bug report #1470. I have found that if I have a
> boolean column and create an index on it, it doesn't get picked up for
> conditions like "WHERE column" or "WHERE NOT column", only "WHERE column =
> true" or "WHERE column = false".

> Do you consider this worth fixing?

No; mainly because a btree index on a boolean column is ordinarily a
waste of disk space.

A partial index (with some non-boolean column as the nominally indexed
data) is generally a better solution.

            regards, tom lane

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