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 586C253BE8 for ; Wed, 11 May 2005 12:04:03 -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 25502-03 for ; Wed, 11 May 2005 15:03:52 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 01BFB54A11 for ; Wed, 11 May 2005 12:03:51 -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 j4BF3hu6004086; Wed, 11 May 2005 11:03:43 -0400 (EDT) To: John A Meinel Cc: Edin Kadribasic , pgsql-performance@postgresql.org Subject: Re: Optimizer wrongly picks Nested Loop Left Join In-reply-to: <428210FF.4090302@arbash-meinel.com> References: <001f01c55604$494d2e60$1200000a@intra.emini.dk> <428210FF.4090302@arbash-meinel.com> Comments: In-reply-to John A Meinel message dated "Wed, 11 May 2005 09:04:47 -0500" Date: Wed, 11 May 2005 11:03:43 -0400 Message-ID: <4085.1115823823@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/208 X-Sequence-Number: 12372 John A Meinel writes: > Unfortunately, because Hash Join doesn't report the number of rows > (rows=0 always), it's hard to tell how good the estimator is. This is only a cosmetic problem because you can just look at the number of rows actually emitted by the Hash node's child; that's always exactly the number loaded into the hashtable. (But having said that, it is fixed in CVS tip.) You may be confused though --- the Hash node is not the Hash Join node. A zero report from Hash Join does actually mean that it emitted zero rows. regards, tom lane