Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group