Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 1B8679FBA5B for ; Mon, 7 May 2007 18:37:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 51871-08 for ; Mon, 7 May 2007 18:37:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id B983B9FB96B for ; Mon, 7 May 2007 18:37:34 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l47LbXnF019020; Mon, 7 May 2007 17:37:33 -0400 (EDT) To: Abu Mushayeed cc: pgsql-admin@postgresql.org Subject: Re: Plannner favoring nested loop In-reply-to: <888904.7334.qm@web57103.mail.re3.yahoo.com> References: <888904.7334.qm@web57103.mail.re3.yahoo.com> Comments: In-reply-to Abu Mushayeed message dated "Mon, 07 May 2007 13:33:59 -0700" Date: Mon, 07 May 2007 17:37:33 -0400 Message-ID: <19019.1178573853@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/52 X-Sequence-Number: 25372 Abu Mushayeed writes: > I am trying to determine if I can make the planner see that nested loop is very expensive while it is trying to do an plan for a query and not pick that route. If it's doing that when it shouldn't, it's probably because it's underestimated the number of rows in the outer relation. Look to your stats settings. regards, tom lane