Re: Using index for IS NULL query

From: "Vladimir Sitnikov" <sitnikov(dot)vladimir(at)gmail(dot)com>
To: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
Cc: Andrus <kobruleht2(at)hot(dot)ee>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Using index for IS NULL query
Date: 2008-11-11 23:00:13
Message-ID: 1d709ecc0811111500i3c63e345qfa3be90264629256@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Yes, NULL values are not stored in the index, but you may create functional
> index on
>
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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2008-11-11 23:34:42 Re: Using index for IS NULL query
Previous Message Jim 'Decibel!' Nasby 2008-11-11 22:42:57 Re: Oddity with view (now with test case)