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

Re: ISNULL performance tweaks

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Matt Mello <alien(at)spaceship(dot)com>,pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: ISNULL performance tweaks
Date: 2003-03-06 19:04:33
Message-ID: 200303061104.33335.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
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


In response to

pgsql-performance by date

Next:From: Josh BerkusDate: 2003-03-06 19:12:07
Subject: Re: ISNULL performance tweaks
Previous:From: Matt MelloDate: 2003-03-06 18:51:11
Subject: ISNULL performance tweaks

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