X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 784EA3A54F0 for ; Thu, 2 Dec 2004 19:19:47 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 66246-05 for ; Thu, 2 Dec 2004 19:19:40 +0000 (GMT) Received: from frank.wiles.org (frank.wiles.org [24.124.39.75]) by svr1.postgresql.org (Postfix) with ESMTP id 1C5B33A3F05 for ; Thu, 2 Dec 2004 19:19:40 +0000 (GMT) Received: from kungfu (frank.wiles.org [24.124.39.75]) by frank.wiles.org (8.12.11/8.12.11) with SMTP id iB2KO54K004721; Thu, 2 Dec 2004 14:24:05 -0600 Date: Thu, 2 Dec 2004 13:20:14 -0600 From: Frank Wiles To: Pallav Kalva Cc: pgsql-performance@postgresql.org Subject: Re: Poor Performance on a table Message-Id: <20041202132014.27456058.frank@wiles.org> In-Reply-To: <41AF68F2.1050206@deg.cc> References: <41AF68F2.1050206@deg.cc> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/65 X-Sequence-Number: 9440 On Thu, 02 Dec 2004 14:11:46 -0500 Pallav Kalva wrote: > Hi , > > I have a table in my production database which has 500k rows and > from the pg_class it shows the number of "relpages" of > around 750K for this table, the same table copied to a test database > shows "relpages" as 35k. I run vacuumdb on the whole > database (not on the table individually but the whole database) daily. > > I think because of this most of queries are slowing down which used to > > run much faster before. > Is there any way to fix this problem ? Try a VACUUM FULL, this will clean up unused space. You might also want to adjust your free space map so that you don't have to do FULL vacuums as often ( or at all ). It is controlled by max_fsm_pages and max_fsm_relations. --------------------------------- Frank Wiles http://www.wiles.org ---------------------------------