Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6ED379FA351 for ; Wed, 10 Jan 2007 13:16:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 22151-02 for ; Wed, 10 Jan 2007 13:15:48 -0400 (AST) 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 D27249FA344 for ; Wed, 10 Jan 2007 13:15:48 -0400 (AST) 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 l0AHFi5i010061; Wed, 10 Jan 2007 12:15:45 -0500 (EST) To: "Jeremy Haile" cc: pgsql-performance@postgresql.org Subject: Re: Slow inner join, but left join is fast In-reply-to: <1168445842.5566.1168570133@webmail.messagingengine.com> References: <1168445842.5566.1168570133@webmail.messagingengine.com> Comments: In-reply-to "Jeremy Haile" message dated "Wed, 10 Jan 2007 11:17:22 -0500" Date: Wed, 10 Jan 2007 12:15:44 -0500 Message-ID: <10060.1168449344@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/133 X-Sequence-Number: 22734 "Jeremy Haile" writes: > I have a query made by joining two subqueries where the outer query > performing the join takes significantly longer to run than the two > subqueries. Please show EXPLAIN ANALYZE results, not just EXPLAIN. Also, have you analyzed your tables recently? regards, tom lane