X-Original-To: pgsql-performance@postgresql.org Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id 6A8834764B3 for ; Thu, 6 Mar 2003 14:03:47 -0500 (EST) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2883163; Thu, 06 Mar 2003 11:03:32 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Matt Mello , pgsql-performance Subject: Re: ISNULL performance tweaks Date: Thu, 6 Mar 2003 11:04:33 -0800 X-Mailer: KMail [version 1.4] References: <3E67989F.7030001@spaceship.com> In-Reply-To: <3E67989F.7030001@spaceship.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200303061104.33335.josh@agliodbs.com> X-Archive-Number: 200303/43 X-Sequence-Number: 1341 Matt, > I recall seeing an email (I believe on this list) about how to improve=20 > performance of ISNULL's with some sort of tweak or trick. However, I=20 > can't find that email anywhere, and couldn't find it searching the=20 > maillist archives. Easy. Create a partial index on NULLs: CREATE INDEX idx_tablename_nulls ON tablename(columname) WHERE columname IS NULL; --=20 -Josh Berkus Aglio Database Solutions San Francisco