Re: Need to increase performance of a query

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Craig James <craig_james(at)emolecules(dot)com>
Cc: Anne Rosset <arosset(at)collab(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Need to increase performance of a query
Date: 2010-06-10 19:57:16
Message-ID: 4C11439C.3010603@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Anne Rosset 2010-06-10 20:08:27 Re: Need to increase performance of a query
Previous Message Anne Rosset 2010-06-10 19:56:49 Re: Need to increase performance of a query