X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 1900230DD20 for ; Wed, 18 Jun 2003 16:21:19 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 74532-06 for ; Wed, 18 Jun 2003 13:21:08 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 4E15930D185 for ; Wed, 18 Jun 2003 13:21:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h5IGL7U6022167; Wed, 18 Jun 2003 12:21:07 -0400 (EDT) To: Bruno Wolff III Cc: pgsql-performance@postgresql.org Subject: Re: Recent 7.4 change slowed down a query by a factor of 3 In-reply-to: <20030618155340.GA21222@wolff.to> References: <20030618150210.GA20603@wolff.to> <21750.1055949519@sss.pgh.pa.us> <20030618155340.GA21222@wolff.to> Comments: In-reply-to Bruno Wolff III message dated "Wed, 18 Jun 2003 10:53:40 -0500" Date: Wed, 18 Jun 2003 12:21:07 -0400 Message-ID: <22166.1055953267@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200306/128 X-Sequence-Number: 2212 Bruno Wolff III writes: > After doing an initdb I got the expected plan. Hm. I'm not sure what happened there --- I don't recall that we made any initdb-needing changes in the past week or so. (If we did, we should have forced initdb by incrementing catversion, but sometimes people forget to do that.) The only change I can think of that's related at all is that the outer query's "group by foo order by foo desc" should now only require one sort step not two (which is probably why my test went for the Sort/GroupAggregate plan not the HashAgg/Sort plan you showed). But that shouldn't have affected the plan for the inner SELECT DISTINCT query, AFAICS. Odd. Probably not worth spending time on though. regards, tom lane