X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4F7B9D1D58C for ; Wed, 19 Nov 2003 15:51:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 00374-05 for ; Wed, 19 Nov 2003 11:51:15 -0400 (AST) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id A0341D1D587 for ; Wed, 19 Nov 2003 11:51:10 -0400 (AST) Received: (qmail 19165 invoked by uid 500); 19 Nov 2003 15:49:59 -0000 Date: Wed, 19 Nov 2003 09:49:59 -0600 From: Bruno Wolff III To: Rajesh Kumar Mallah Cc: pgsql-performance@postgresql.org Subject: Re: problem with select count(*) .. Message-ID: <20031119154959.GA18327@wolff.to> Mail-Followup-To: Rajesh Kumar Mallah , pgsql-performance@postgresql.org References: <3FBC1ADA.4040709@trade-india.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FBC1ADA.4040709@trade-india.com> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/160 X-Sequence-Number: 4720 On Thu, Nov 20, 2003 at 07:07:30 +0530, Rajesh Kumar Mallah wrote: > > If i dump and reload the performance improves and it takes < 1 sec. This > is what i have been doing since the upgrade. But its not a solution. > > The Vacuum full is at the end of a loading batch SQL file which makes lot of > insert , deletes and updates. If a dump and reload fixes your problem, most likely you have a lot of dead tuples in the table. You might need to run vacuum more often. You might have an open transaction that is preventing vacuum full from cleaning up the table.