Re: Using index for IS NULL query

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Using index for IS NULL query
Дата
Msg-id dcc563d10811111534x3957273aw8365cb497cc0c91c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Using index for IS NULL query  ("Vladimir Sitnikov" <sitnikov.vladimir@gmail.com>)
Список pgsql-performance
On Tue, Nov 11, 2008 at 4:00 PM, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:
>
>> Yes, NULL values are not stored in the index, but you may create
>> functional index on
>
> Are you sure NULL values are not stored? btree, gist and bitmap index and
> search for NULL values.

It's not that they're not stored, it's that before 8.3 pg didn't know
how to compare to them I believe.  The standard trick was to create a
partial index with "where x is null" on the table / column.  8.3 knows
how to compare them and doesn't need the partial index.

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

Предыдущее
От: "Vladimir Sitnikov"
Дата:
Сообщение: Re: Using index for IS NULL query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Oddity with view (now with test case)