Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 46EC79FB9BD for ; Tue, 13 Feb 2007 13:51:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 45186-10 for ; Tue, 13 Feb 2007 13:51:07 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 07E709FB979 for ; Tue, 13 Feb 2007 13:51:07 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l1DHp52Y001978; Tue, 13 Feb 2007 12:51:05 -0500 (EST) To: "Guillaume Smet" cc: pgsql-performance@postgresql.org Subject: Re: Question about Bitmap Heap Scan/BitmapAnd In-reply-to: <1d4e0c10702130917x5b6ddaf7g540bfe1f7c93b728@mail.gmail.com> References: <1d4e0c10702130832i35484abfmb229f5d0b4d9223b@mail.gmail.com> <1285.1171385353@sss.pgh.pa.us> <1d4e0c10702130917x5b6ddaf7g540bfe1f7c93b728@mail.gmail.com> Comments: In-reply-to "Guillaume Smet" message dated "Tue, 13 Feb 2007 18:17:41 +0100" Date: Tue, 13 Feb 2007 12:51:05 -0500 Message-ID: <1977.1171389065@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.072 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200702/130 X-Sequence-Number: 23184 "Guillaume Smet" writes: > So the basic explanation is that it's in both lists due to the partial > index and only qpqual keeps the condition? I would have expected the > opposite but it doesn't change anything I suppose? It gets the right answer, yes. I'm not sure if we could safely put the condition into the recheck instead of the filter. The particular code I showed you has to go the direction it does, because a condition in the filter has to be checked even if the bitmap is not lossy. I seem to recall concluding that we had to recheck partial-index conditions even if the bitmap is not lossy, but I can't reconstruct my reasoning at the moment. regards, tom lane