X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id BAD1F30ED11 for ; Mon, 16 Jun 2003 14:11:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 31863-05 for ; Mon, 16 Jun 2003 11:11:01 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 0D27F30EE92 for ; Mon, 16 Jun 2003 11:11:01 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h5GEB0U6002620; Mon, 16 Jun 2003 10:11:00 -0400 (EDT) To: jim@nasby.net Cc: pgsql-performance@postgresql.org Subject: Re: Partial index where clause not filtering through In-reply-to: <20030616012456.U66185@flake.decibel.org> References: <20030616003118.S66185@flake.decibel.org> <26793.1055742214@sss.pgh.pa.us> <20030616012456.U66185@flake.decibel.org> Comments: In-reply-to "Jim C. Nasby" message dated "Mon, 16 Jun 2003 01:24:56 -0500" Date: Mon, 16 Jun 2003 10:11:00 -0400 Message-ID: <2619.1055772660@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200306/90 X-Sequence-Number: 2174 "Jim C. Nasby" writes: > Well, it would only need to make the checks if the table had partial > indexes. Even then, it probably makes sense to only do the check if > other query planning steps decide it would be useful to use the partial > index. You have that backwards. Planning is bottom-up, so we have to determine the relevant indexes *first*. Accordingly, a partial index is a performance drag on every query that uses its table, as we check to see if the partial index qual is satisfied by the query's WHERE clause. That's why I don't want it to be any slower than it is ... regards, tom lane