Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B37612E01F4 for ; Wed, 23 Jan 2008 13:26:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63043-06-4 for ; Wed, 23 Jan 2008 13:26:06 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 850272E300B for ; Wed, 23 Jan 2008 13:17:59 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m0NHHuQ3022363; Wed, 23 Jan 2008 12:17:56 -0500 (EST) To: "Guillaume Smet" cc: "Dmitry Potapov" , pgsql-performance@postgresql.org Subject: Re: planner chooses unoptimal plan on joins with complex key In-reply-to: <1d4e0c10801230558i1e56a9dcgaa9e6c2fac6d0448@mail.gmail.com> References: <878c83960801230548i6bee9353m19bcee7335220c9b@mail.gmail.com> <1d4e0c10801230558i1e56a9dcgaa9e6c2fac6d0448@mail.gmail.com> Comments: In-reply-to "Guillaume Smet" message dated "Wed, 23 Jan 2008 14:58:52 +0100" Date: Wed, 23 Jan 2008 12:17:56 -0500 Message-ID: <22362.1201108676@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/195 X-Sequence-Number: 28434 "Guillaume Smet" writes: > It doesn't look like an EXPLAIN ANALYZE output. Can you provide a real > one (you should have a second set of numbers with EXPLAIN ANALYZE)? Also, could we see the pg_stats rows for the columns being joined? regards, tom lane