pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matt Mello <alien@spaceship.com>
To: pgsql-performance <pgsql-performance@postgresql.org>
Subject: ISNULL performance tweaks
Date: Thu, 06 Mar 2003 12:51:11 -0600
Message-ID: <3E67989F.7030001@spaceship.com> (raw)

I have some existing code running in a production environment with 
embedded SELECTs whose WHERE's use ISNULL tests on indexed foreign key 
fields.  This is obviously very slow.

My ISNULL *queries *take anywhere from 6 to 40 seconds.  These queries 
are used to generate reports to a device which times out at 20 seconds, 
so half the time these devices don't get their reports, which makes my 
customers VERY angry.

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.

So, until I have the time to code the fixes I need to prevent the use of 
ISNULL, does anybody know how I can speed up this existing system?

Man, I wish PG indexed nulls!  Is there any plan on adding these in the 
future?

Thanks for any help you can give!

-- 
Matt Mello




view thread (3+ messages)  latest in thread

Message-ID: <3E67989F.7030001@spaceship.com>
Permalink:  ../3E67989F.7030001@spaceship.com/
Also on:    postgresql.org/message-id/3E67989F.7030001@spaceship.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 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: alien@spaceship.com
  Subject: Re: ISNULL performance tweaks
  In-Reply-To: <3E67989F.7030001@spaceship.com>
  References: <3E67989F.7030001@spaceship.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