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

Поиск
Список
Период
Сортировка
От Bjørn T Johansen
Тема Does not use index on query using "field is null"?
Дата
Msg-id 20101110130749.14dff805@pennywise.asp-as.no
обсуждение исходный текст
Ответы Re: Does not use index on query using "field is null"?  (Vick Khera <vivek@khera.org>)
Re: Does not use index on query using "field is null"?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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?


Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj@havleik.no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

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

Предыдущее
От: Szymon Guz
Дата:
Сообщение: Re: Comments on tables
Следующее
От: Vick Khera
Дата:
Сообщение: Re: Does not use index on query using "field is null"?