X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0A954DB577 for ; Mon, 31 Oct 2005 17:08:12 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 19038-09 for ; Mon, 31 Oct 2005 21:08:09 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A6E1EDB527 for ; Mon, 31 Oct 2005 17:08:10 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9VL8Cwc018971; Mon, 31 Oct 2005 16:08:12 -0500 (EST) To: "Merlin Moncure" Cc: pgsql-performance@postgresql.org, "Kelly Burkhart" Subject: Re: 8.x index insert performance In-reply-to: <6EE64EF3AB31D5448D0007DD34EEB3417DD731@Herge.rcsinc.local> References: <6EE64EF3AB31D5448D0007DD34EEB3417DD731@Herge.rcsinc.local> Comments: In-reply-to "Merlin Moncure" message dated "Mon, 31 Oct 2005 16:01:34 -0500" Date: Mon, 31 Oct 2005 16:08:12 -0500 Message-ID: <18970.1130792892@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200510/483 X-Sequence-Number: 15251 "Merlin Moncure" writes: >> You're mistaken, at least with regard to btree indexes. > hmm. I tried several different ways to filter/extract null values from > an indexed key and got a seq scan every time. I said they were stored, not that you could query against them ;-) IS NULL isn't considered an indexable operator, mainly because it's not an operator at all in the strict sense of the word; and our index access APIs only support querying on indexable operators. The reason they're stored is that they have to be in order to make multi-column indexes work right. I suppose we could special-case single-column indexes, but we don't. In any case, it's more likely that someone would one day get around to making IS NULL an indexable operator than that we'd insert a special case like that. regards, tom lane