Re: Using index for IS NULL query

От: Tomas Vondra
Тема: Re: Using index for IS NULL query
Дата: ,
Msg-id: 491B7473.3050407@fuzzy.cz
(см: обсуждение, исходный текст)
Ответ на: Re: Using index for IS NULL query  ("Vladimir Sitnikov")
Список: pgsql-performance

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

Using index for IS NULL query  ("Andrus", )
 Re: Using index for IS NULL query  (Tom Lane, )
  Re: Using index for IS NULL query  (Andreas Kretschmer, )
  Re: Using index for IS NULL query  (Matthew Wakeling, )
 Re: Using index for IS NULL query  (Andreas Kretschmer, )
 Re: Using index for IS NULL query  (Tomas Vondra, )
  Re: Using index for IS NULL query  ("Vladimir Sitnikov", )
   Re: Using index for IS NULL query  ("Scott Marlowe", )
   Re: Using index for IS NULL query  (Tomas Vondra, )
  Index usage with sub select or inner joins  ("Julien Theulier", )
   Re: Index usage with sub select or inner joins  (Joshua Tolley, )
    Re: Index usage with sub select or outer joins  ("Julien Theulier", )

Well, you're obviously right - I didn't know this. I guess I've found
that the index is not used for null values, and deduced somehow that
NULL values are not stored in the index.

Thanks, it's nice to find out a 'bug' before it's too late :-)

regards
Tomas

> Are you sure NULL values are not stored? btree, gist and bitmap index
> and search for NULL values.
>
> select amname, amindexnulls, amsearchnulls from pg_am;
>
>  amname | amindexnulls | amsearchnulls
> --------+--------------+---------------
>  btree  | t            | t
>  hash   | f            | f
>  gist   | t            | t
>  gin    | f            | f
>  bitmap | t            | t
> (5 rows)
>
>
> Sincerely yours,
> Vladimir Sitnikov



В списке pgsql-performance по дате сообщения:

От: "Scott Marlowe"
Дата:
Сообщение: Re: Performance Question
От: "Dave Page"
Дата:
Сообщение: Re: Performance Question