X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0DFCB5636F for ; Tue, 8 Mar 2005 17:54:13 +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 47964-03 for ; Tue, 8 Mar 2005 17:54:05 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 3CC3852A59 for ; Tue, 8 Mar 2005 17:54:00 +0000 (GMT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 08 Mar 2005 11:53:59 -0600 Subject: Re: Postgres is slow From: Scott Marlowe To: John R Pierce Cc: pgsql-jdbc@postgresql.org In-Reply-To: <422DE271.5010701@hogranch.com> References: <6bf1b0a005030805495ec76763@mail.gmail.com> <422DE271.5010701@hogranch.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1110304438.30529.602.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 08 Mar 2005 11:53:59 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/70 X-Sequence-Number: 12463 On Tue, 2005-03-08 at 11:35, John R Pierce wrote: > I've found that 7.x pgsql databases periodically need to be pg_dump'd, dropdb, > then reloaded from the dump to continue to perform well... on a heavy use web > server database which includes a busy user forum, I find doing this about 2-3 > times a year keeps things smooth. there may be a better way to clean them up, > but I've not found it. The most common cause here was index bloat. dropping / recreating the indexes usually fixes the performance problems. reindex indexname from the psql command line works well to do this. note that some usage patterns that cause catalog indexes to bloat can only be corrected by reindexing while in single user mode.