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)
Список: pgsql-performance

Скрыть дерево обсуждения

Index on a NULL-value  (Tobias Brox, )
 Re: Index on a NULL-value  (Bruno Wolff III, )
  Re: Index on a NULL-value  (Tobias Brox, )
   Re: Index on a NULL-value  (Bruno Wolff III, )
 Re: Index on a NULL-value  (Tobias Brox, )
  Re: Index on a NULL-value  (Bruno Wolff III, )
   Re: Index on a NULL-value  (Tobias Brox, )
    Re: Index on a NULL-value  (Greg Stark, )
     Re: Index on a NULL-value  (Tom Lane, )
   Re: Index on a NULL-value  (Tom Lane, )
    Re: Index on a NULL-value  (Tobias Brox, )
 Re: Index on a NULL-value  (Tobias Brox, )

> 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 по дате сообщения:

От: "Praveen Raja"
Дата:
Сообщение: very large table
От: Dirk Lutzebäck
Дата:
Сообщение: SURVEY: who is running postgresql on 8 or more CPUs?