From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Craig James <craig_james@emolecules.com>
Cc: Anne Rosset <arosset@collab.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Need to increase performance of a query
Date: Thu, 10 Jun 2010 22:57:16 +0300
Message-ID: <4C11439C.3010603@enterprisedb.com> (raw)
In-Reply-To: <4C11413B.8080107@emolecules.com>
References: <4C1125F0.8090101@collab.net>
<4C112B19.6080908@krogh.cc>
<4C113098.5040105@collab.net>
<98414706.20100610212211@erwied.eu>
<4C113E2F.6000305@collab.net>
<4C11413B.8080107@emolecules.com>
On 10/06/10 22:47, Craig James wrote:
> Postgres normally doesn't index NULL values even if the column is
> indexed, so it has to do a table scan when your query includes an IS
> NULL condition.
That was addressed in version 8.3. 8.3 and upwards can use an index for
IS NULL.
I believe the NULLs were stored in the index in earlier releases too,
they just couldn't be searched for.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
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: heikki.linnakangas@enterprisedb.com, craig_james@emolecules.com, arosset@collab.net
Subject: Re: Need to increase performance of a query
In-Reply-To: <4C11439C.3010603@enterprisedb.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