pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Cc: Tomas Vondra <tv@fuzzy.cz>
Cc: Andrus <kobruleht2@hot.ee>
Cc: pgsql-performance@postgresql.org
Subject: Re: Using index for IS NULL query
Date: Tue, 11 Nov 2008 16:34:42 -0700
Message-ID: <dcc563d10811111534x3957273aw8365cb497cc0c91c@mail.gmail.com> (raw)
In-Reply-To: <1d709ecc0811111500i3c63e345qfa3be90264629256@mail.gmail.com>
References: <gfcprb$m40$1@news.hub.org>
	<4919F2C6.4000303@fuzzy.cz>
	<1d709ecc0811111500i3c63e345qfa3be90264629256@mail.gmail.com>

On Tue, Nov 11, 2008 at 4:00 PM, Vladimir Sitnikov
<sitnikov.vladimir@gmail.com> wrote:
>
>> 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.

It's not that they're not stored, it's that before 8.3 pg didn't know
how to compare to them I believe.  The standard trick was to create a
partial index with "where x is null" on the table / column.  8.3 knows
how to compare them and doesn't need the partial index.



view thread (9+ messages)  latest in thread

Message-ID: <dcc563d10811111534x3957273aw8365cb497cc0c91c@mail.gmail.com>
Permalink:  ../dcc563d10811111534x3957273aw8365cb497cc0c91c@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10811111534x3957273aw8365cb497cc0c91c@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: scott.marlowe@gmail.com, sitnikov.vladimir@gmail.com, tv@fuzzy.cz, kobruleht2@hot.ee
  Subject: Re: Using index for IS NULL query
  In-Reply-To: <dcc563d10811111534x3957273aw8365cb497cc0c91c@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox