X-Original-To: pgsql-performance@postgresql.org Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id DC0684764C0 for ; Thu, 6 Mar 2003 14:11:20 -0500 (EST) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2883187; Thu, 06 Mar 2003 11:11:06 -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:12:07 -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: <200303061112.07285.josh@agliodbs.com> X-Archive-Number: 200303/44 X-Sequence-Number: 1342 Matt, > Man, I wish PG indexed nulls! Is there any plan on adding these in the= =20 > future? BTW, this is a design argument. As far as a lot of SQL-geeks are concerned= =20 (and I'm one of them) use of NULLs should be minimized or eliminiated=20 entirely from well-normalized database designs. In such designs, IS NULL= =20 queries are used only for outer joins (where indexes don't matter) or for= =20 data integrity maintainence (where query speed doesn't matter).=20=20=20 As a result, the existing core team doesn't see this issue as a priority.= =20=20 What fixing it requires is a new programmer who cares enough about it to ha= ck=20 it. What would be really nice is the ability to create an index WITH NULLS= ,=20 as follows: CREATE INDEX idx_tablename_one ON tablename(column_one) WITH NULLS; --=20 -Josh Berkus Aglio Database Solutions San Francisco