X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A457152B0D for ; Thu, 14 Jul 2005 20:30:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24847-08 for ; Thu, 14 Jul 2005 23:30:05 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8CA5752C63 for ; Thu, 14 Jul 2005 20:30:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j6ENU2Zr005709; Thu, 14 Jul 2005 19:30:02 -0400 (EDT) To: John A Meinel Cc: Dan Harris , pgsql-performance@postgresql.org Subject: Re: slow joining very large table to smaller ones In-reply-to: <42D6F177.3000002@arbash-meinel.com> References: <46AF8F35-B735-4DFA-BA0A-AC82B5DA3CCE@drivefaster.net> <42D687E5.7080202@arbash-meinel.com> <42D6F177.3000002@arbash-meinel.com> Comments: In-reply-to John A Meinel message dated "Thu, 14 Jul 2005 18:12:55 -0500" Date: Thu, 14 Jul 2005 19:30:02 -0400 Message-ID: <5708.1121383802@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/193 X-Sequence-Number: 13434 John A Meinel writes: > What I don't understand is that the planner is actually estimating that > joining against the new table is going to *increase* the number of > returned rows. It evidently thinks that incidentid in the k_r table is pretty nonunique. We really need to look at the statistics data to see what's going on. regards, tom lane