Re: Index on a NULL-value

Поиск
Список
Период
Сортировка
От Tobias Brox
Тема Re: Index on a NULL-value
Дата
Msg-id 20050531055932.GL26100@tobias.exoweb.net
обсуждение исходный текст
Ответ на Re: Index on a NULL-value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
> CREATE INDEX b_is_null ON mock(a) WHERE b IS NULL;
>
> where a is chosen as a column that you frequently also test in
> conjunction with "b IS NULL".  That is, the above index can efficiently
> handle queries like
>
>     ... WHERE a = 42 AND b IS NULL ...

This is wonderful, it seems like most of our problems (probably also
regarding the "index on timestamp"-thread I started separately) can be
solved with partial indexing on expressions.  No need to hide under
bedclothes anymore ;-)

--
Tobias Brox, Beijing

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Index on a NULL-value
Следующее
От: "Praveen Raja"
Дата:
Сообщение: very large table