Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TW8xb-00082F-0w for pgsql-performance@postgresql.org; Wed, 07 Nov 2012 16:58:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TW8xY-0002fx-HI for pgsql-performance@postgresql.org; Wed, 07 Nov 2012 16:58:38 +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 qA7GwZmv010570; Wed, 7 Nov 2012 11:58:35 -0500 (EST) From: Tom Lane To: Merlin Moncure cc: Rodrigo Rosenfeld Rosas , pgsql-performance@postgresql.org Subject: Re: Query completed in < 1s in PG 9.1 and ~ 700s in PG 9.2 In-reply-to: References: <509944DE.6020400@gmail.com> <5099525B.5070909@gmail.com> <50995D7C.9020108@gmail.com> <17866.1352229874@sss.pgh.pa.us> <50996583.2080703@gmail.com> <18371.1352231105@sss.pgh.pa.us> <509A42F9.6040403@gmail.com> Comments: In-reply-to Merlin Moncure message dated "Wed, 07 Nov 2012 10:34:54 -0600" Date: Wed, 07 Nov 2012 11:58:34 -0500 Message-ID: <10569.1352307514@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201211/94 X-Sequence-Number: 48460 Merlin Moncure writes: > On Wed, Nov 7, 2012 at 5:16 AM, Rodrigo Rosenfeld Rosas > wrote: >> This was a great guess! Congrats, Merlin: > Heh -- that was tom's guess, not mine. What this does is confirm the > planner regression and that elevates the importance of Tom's request > to get sample data so we (he) can fix it. Well, the fact that it's a planner runtime problem and not a quality-of-plan problem is new information (I'd been assuming the latter). Given that, it's possible it's already fixed: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=ca2d6a6cef5740b29406980eb8d21d44da32634b but I'd still want to see a test case to be sure. In any case, it's not clear what's the critical difference between the "fast" and "slow" versions of the query. regards, tom lane