Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 97CAA9FBD8F for ; Thu, 15 Feb 2007 12:27:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 51673-03 for ; Thu, 15 Feb 2007 12:27:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 139429FBCEA for ; Thu, 15 Feb 2007 12:27:36 -0400 (AST) Received: from perhan.alvh.no-ip.org (216-155-79-222.bk1-dsl.surnet.cl [216.155.79.222]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l1FGRa0G027542; Thu, 15 Feb 2007 08:27:37 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6C79732A18; Thu, 15 Feb 2007 13:27:33 -0300 (CLST) Date: Thu, 15 Feb 2007 13:27:33 -0300 From: Alvaro Herrera To: Guillaume Smet Cc: Tom Lane , pgsql-performance@postgresql.org Subject: Re: Question about Bitmap Heap Scan/BitmapAnd Message-ID: <20070215162733.GO4682@alvh.no-ip.org> Mail-Followup-To: Guillaume Smet , Tom Lane , pgsql-performance@postgresql.org References: <1d4e0c10702130832i35484abfmb229f5d0b4d9223b@mail.gmail.com> <1285.1171385353@sss.pgh.pa.us> <1d4e0c10702130917x5b6ddaf7g540bfe1f7c93b728@mail.gmail.com> <1977.1171389065@sss.pgh.pa.us> <1d4e0c10702150805i73097134uf45ce1faa80e3763@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1d4e0c10702150805i73097134uf45ce1faa80e3763@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Thu, 15 Feb 2007 08:27:37 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.234 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200702/173 X-Sequence-Number: 23227 Guillaume Smet escribió: > I'm still working on my proximity query, testing PostGIS now. I > noticed an issue with a gist index on a point which seems related to > my previous question. > > I have the following in my plan: > -> Bitmap Heap Scan on lieu l (cost=13.37..1555.69 rows=844 > width=118) (actual time=3.672..39.497 rows=1509 loops=1) > Filter: (((dfinvalidlieu IS NULL) OR (dfinvalidlieu >= now())) > AND (wgslat IS NOT NULL) AND (wgslon IS NOT NULL) AND (wgslat <> > 41.89103400) AND (wgslon <> 12.49244400) AND (earthpoint && > '0103000020777F0000010000000500000000000040019B334100000020D1D8514100000040019B334100000040ADDE51410000006071B2334100000040ADDE51410000006071B2334100000020D1D8514100000040019B334100000020D1D85141'::geometry) > AND (numlieu <> 49187)) > -> Bitmap Index Scan on idx_lieu_earthpoint (cost=0.00..13.37 > rows=1249 width=0) (actual time=2.844..2.844 rows=1510 loops=1) > Index Cond: (earthpoint && > '0103000020777F0000010000000500000000000040019B334100000020D1D8514100000040019B334100000040ADDE51410000006071B2334100000040ADDE51410000006071B2334100000020D1D8514100000040019B334100000020D1D85141'::geometry) > > Is it normal I have no recheck cond and the index cond of Bitmap Index > Scan is in the filter? Is it also a consequence of the code you > pointed? It is in the filter, is it not? Having a recheck would be redundant. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.