X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 294459FA5EA for ; Mon, 11 Sep 2006 11:29:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 80117-10 for ; Mon, 11 Sep 2006 11:28:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 71D259FA1AD for ; Mon, 11 Sep 2006 11:28:56 -0300 (ADT) 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 k8BESpMW022642; Mon, 11 Sep 2006 10:28:51 -0400 (EDT) To: Florian Weimer cc: pgsql-performance@postgresql.org Subject: Re: Abysmal hash join In-reply-to: <821wqiy0oc.fsf@mid.bfk.de> References: <821wqiy0oc.fsf@mid.bfk.de> Comments: In-reply-to Florian Weimer message dated "Mon, 11 Sep 2006 15:48:03 +0200" Date: Mon, 11 Sep 2006 10:28:51 -0400 Message-ID: <22641.1157984931@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.11 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/60 X-Sequence-Number: 20746 Florian Weimer writes: > -> Bitmap Index Scan on large_rel_1_field_1 (cost=0.00..2003.09 rows=193739 width=0) (actual time=0.148..0.148 rows=12 loops=1) > Index Cond: (n.field_1 = "outer".field_2) What you need to look into is why that rowcount estimate is off by four orders of magnitude. The estimate on the smaller table is only off by a factor of 75 but that's still pretty darn awful. Are the statistics up to date? Maybe larger stats targets would help. regards, tom lane