X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BA8AA5280A for ; Tue, 31 May 2005 02:13:10 -0300 (ADT) 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 01084-06 for ; Tue, 31 May 2005 05:13:06 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3643952855 for ; Tue, 31 May 2005 02:13:06 -0300 (ADT) 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 j4V5Ck9x008325; Tue, 31 May 2005 01:12:46 -0400 (EDT) To: Greg Stark Cc: Tobias Brox , Bruno Wolff III , pgsql-performance@postgresql.org Subject: Re: Index on a NULL-value In-reply-to: <87mzqcvxdm.fsf@stark.xeocode.com> References: <20050531030207.GD26100@tobias.exoweb.net> <20050531032119.GH26100@tobias.exoweb.net> <20050531033633.GA20015@wolff.to> <20050531034529.GJ26100@tobias.exoweb.net> <87mzqcvxdm.fsf@stark.xeocode.com> Comments: In-reply-to Greg Stark message dated "31 May 2005 00:21:25 -0400" Date: Tue, 31 May 2005 01:12:46 -0400 Message-ID: <8324.1117516366@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/463 X-Sequence-Number: 12627 Greg Stark writes: > then it would be a candidate because the ORDER BY or the other > 0 make the > index look relevant. But I don't think (again I'm not 100% sure) that the > partial index WHERE clause is considered in picking which indexes to consider. Nope, the partial index will be considered simply on the strength of its predicate matching the WHERE clause. Of course, if you can get some additional mileage by having the index contents be useful, that's great --- but it's not necessary. regards, tom lane