Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 814752E2F70 for ; Wed, 23 Jan 2008 10:04:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 04372-05 for ; Wed, 23 Jan 2008 10:03:46 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by postgresql.org (Postfix) with ESMTP id 2B55B2E0037 for ; Wed, 23 Jan 2008 09:58:54 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so5366167waf.5 for ; Wed, 23 Jan 2008 05:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=d+Pe5ulzYANHUA921vxU1Pmvg8pz6UG1x0TPVXYzJvc=; b=m33s7SZ8imJiK3ryqqPWUYY3oyztLkvTfJCOcasC6z2XJ4AJfKES/IRKgyBSolOlliQLpLwx+mkSVth4mxhz8AY1g1U8ZGfhaGvDXy9FTv7eTbnwVRtUjcBuieh5y87IiFPqAvHBxdwXtxzJXOLQE4spW8GfMB+bU51OaCS6U94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hK23CmlAMtTUPTwRUysAqQSXt17Gvi/33hOl3avzUQ8O2I6uLoC1wjgUorpVHm9p+n3Qsp0JDjFfgLVV1AmToJXBcwpsHVltPOekoBskGnLuMqAiWfyD5TDThCHZnhya0eS5tzXUf3mIy1lNW0Pj4lXJSpXGkEmAboiT29/w7yY= Received: by 10.115.109.1 with SMTP id l1mr8177458wam.136.1201096732345; Wed, 23 Jan 2008 05:58:52 -0800 (PST) Received: by 10.114.155.9 with HTTP; Wed, 23 Jan 2008 05:58:52 -0800 (PST) Message-ID: <1d4e0c10801230558i1e56a9dcgaa9e6c2fac6d0448@mail.gmail.com> Date: Wed, 23 Jan 2008 14:58:52 +0100 From: "Guillaume Smet" To: "Dmitry Potapov" Subject: Re: planner chooses unoptimal plan on joins with complex key Cc: pgsql-performance@postgresql.org In-Reply-To: <878c83960801230548i6bee9353m19bcee7335220c9b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <878c83960801230548i6bee9353m19bcee7335220c9b@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/193 X-Sequence-Number: 28432 Dmitry, On Jan 23, 2008 2:48 PM, Dmitry Potapov wrote: > EXPLAIN ANALYZE SELECT * FROM t1t2_view ORDER BY time_stamp ASC LIMIT 100: > > Limit (cost=13403340.40..13403340.40 rows=1 width=152) 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)? Thanks, -- Guillaume