Re: Does not use index on query using "field is null"?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Does not use index on query using "field is null"?
Дата
Msg-id 3520.1289401243@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Does not use index on query using "field is null"?  (Bjørn T Johansen <btj@havleik.no>)
Ответы Re: Does not use index on query using "field is null"?  (Bjørn T Johansen <btj@havleik.no>)
Список pgsql-general
=?ISO-8859-1?Q?Bj=F8rn?= T Johansen <btj@havleik.no> writes:
> I have a query that looks like this...:
> select * from table where field is null

> And when I run explain, it tells me that it uses seq scan... Is this because pg thinks that seq scan is as fast as
usingindexes or because using index on "is null" queries does 
> not work?

What PG version?  Releases before 8.3 do not think that IS NULL is an
indexable condition.

            regards, tom lane

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

Предыдущее
От: Vick Khera
Дата:
Сообщение: Re: Does not use index on query using "field is null"?
Следующее
От: Bjørn T Johansen
Дата:
Сообщение: Re: Does not use index on query using "field is null"?