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 1CFEC30DC47 for ; Wed, 18 Jun 2003 15:50:51 +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 75359-02 for ; Wed, 18 Jun 2003 12:50:40 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 2964030D185 for ; Wed, 18 Jun 2003 12:50:40 -0300 (ADT) Received: (qmail 21258 invoked by uid 500); 18 Jun 2003 15:53:40 -0000 Date: Wed, 18 Jun 2003 10:53:40 -0500 From: Bruno Wolff III To: Tom Lane Cc: pgsql-performance@postgresql.org Subject: Re: Recent 7.4 change slowed down a query by a factor of 3 Message-ID: <20030618155340.GA21222@wolff.to> Mail-Followup-To: Tom Lane , pgsql-performance@postgresql.org References: <20030618150210.GA20603@wolff.to> <21750.1055949519@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21750.1055949519@sss.pgh.pa.us> User-Agent: Mutt/1.5.4i X-Archive-Number: 200306/127 X-Sequence-Number: 2211 On Wed, Jun 18, 2003 at 11:18:39 -0400, Tom Lane wrote: > Bruno Wolff III writes: > > The query below was running in a bit under 300ms on a version of 7.4 > > from less than a week ago until I updated to the version from last night. > > Now it takes about 800ms using a significantly different plan. > > Something fishy here. Will it use the right plan if you set > enable_seqscan off? After doing an initdb I got the expected plan. This is a static db used for dynamic web pages and the script that loads the db does a vacumm analyze at the end. So the db should have had the information needed to pick the correct plan. Possibly something changed that affected the information needed for planning, but the value used to indicate an initdb was needed wasn't changed. In the future if I see odd stuff I will try doing an initdb before reporting a potential problem. Thanks for your help.