Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U8xSR-0007q4-7C for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Feb 2013 18:34:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U8xSQ-0002oy-KT for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Feb 2013 18:34:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U8xSP-0002oC-Fc for pgsql-bugs@postgresql.org; Fri, 22 Feb 2013 18:34:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U8xSM-0002de-FT for pgsql-bugs@postgresql.org; Fri, 22 Feb 2013 18:34:53 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r1MIYmHK005016; Fri, 22 Feb 2013 13:34:48 -0500 (EST) From: Tom Lane To: Jeff Janes cc: Claude Speed , pgsql-bugs@postgresql.org Subject: Re: new BUG: "postgresql 9.2.3: very long query time" In-reply-to: References: <5124D2BE.5090001@gmail.com> Comments: In-reply-to Jeff Janes message dated "Thu, 21 Feb 2013 09:25:31 -0800" Date: Fri, 22 Feb 2013 13:34:48 -0500 Message-ID: <5015.1361558088@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Jeff Janes writes: > The slowness was introduced with this: > Use parameterized paths to generate inner indexscans more flexibly. Try increasing from_collapse_limit to 11 or more. I'm not exactly sure why the param-path patch might have changed this behavior, but in any case the collapse limits ought to be the first thing you think of when you see a crappy plan for a many-relation query. The curious join nesting in this query makes me wonder if perhaps it was hand-optimized to fit the behavior of some old version of the planner ... regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs