From: Josh Berkus <josh@agliodbs.com>
To: Matt Mello <alien@spaceship.com>
To: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: ISNULL performance tweaks
Date: Thu, 6 Mar 2003 11:04:33 -0800
Message-ID: <200303061104.33335.josh@agliodbs.com> (raw)
In-Reply-To: <3E67989F.7030001@spaceship.com>
References: <3E67989F.7030001@spaceship.com>
Matt,
> I recall seeing an email (I believe on this list) about how to improve
> performance of ISNULL's with some sort of tweak or trick. However, I
> can't find that email anywhere, and couldn't find it searching the
> maillist archives.
Easy. Create a partial index on NULLs:
CREATE INDEX idx_tablename_nulls ON tablename(columname)
WHERE columname IS NULL;
--
-Josh Berkus
Aglio Database Solutions
San Francisco
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, alien@spaceship.com
Subject: Re: ISNULL performance tweaks
In-Reply-To: <200303061104.33335.josh@agliodbs.com>
References: <3E67989F.7030001@spaceship.com> <200303061104.33335.josh@agliodbs.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