Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id DB65A1337B8A for ; Wed, 22 Dec 2010 11:24:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 53218-06 for ; Wed, 22 Dec 2010 15:24:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 08C221337B83 for ; Wed, 22 Dec 2010 11:24:42 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oBMFNSV9005295; Wed, 22 Dec 2010 10:23:28 -0500 (EST) To: Michael Monnerie cc: pgsql-admin@postgresql.org Subject: Re: Optimizing Update with WHERE x IN (id1,id2,...) In-reply-to: <201012221059.38145@zmi.at> References: <201012221059.38145@zmi.at> Comments: In-reply-to Michael Monnerie message dated "Wed, 22 Dec 2010 10:59:37 +0100" Date: Wed, 22 Dec 2010 10:23:27 -0500 Message-ID: <5294.1293031407@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/163 X-Sequence-Number: 36392 Michael Monnerie writes: > I just saw this EXPLAIN in PostgreSQL 8.3.12: > [ just like any other bitmap index scan ] > And it seems to me that could be optimized to skip the "Recheck Cond" as > that is already checked by the Index Scan? Should save some CPU cycles. You evidently don't understand what that's for. In typical cases it's not rechecked. The recheck condition is only applied if the index scan becomes lossy. regards, tom lane