X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 590E44762D7 for ; Tue, 8 Apr 2003 13:47:51 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id D64E54762CF for ; Tue, 8 Apr 2003 13:47:50 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id BD86843A89E; Tue, 8 Apr 2003 13:47:50 -0400 (EDT) X-Abuse-Report: abuse@teranews.com Message-ID: <16972d7d885d23dbf446d7bdba1f3ccc@news.teranews.com> Date: Tue, 08 Apr 2003 17:41:16 GMT Lines: 27 From: Jeff Boes Subject: VACUUM slow on small table X-Newsgroups: comp.databases.postgresql.admin Organization: Nexcerpt, Inc. User-Agent: Pan/0.11.4 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Comment-To: ALL To: pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-5.8 required=5.0 tests=BAYES_10,USER_AGENT version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/101 X-Sequence-Number: 8256 Environment: Postgres 7.2.3 under Linux (RH 7.3, 2.4 kernel) We have a table used as a job queue by several background applications. This table gets around 25K inserts and deletes per day, with something like another 25K updates of each of several columns. All this activity causes the indexes to be nearly useless, unless the table is VACUUMed very frequently. At present, this amounts to around every 5-10 minutes (it's actually based on activity in the table, but it works out to around that). The table undergoes VACUUM FULL every night. However, it still shows hundreds of thousands of tuples after such vacuuming. Today, the normal VACUUM took upwards of 15 minutes to perform, instead of the usual handful of seconds. I finally threw up my hands, dumped the table with pg_dump, dropped it, and re-created it. What's going on? Doesn't VACUUM under 7.2.3 do a thorough job of clearing up deleted rows? Should I REINDEX this table nightly as well? Does drop and recreate clear things up even better? --=20 Jeff Boes vox 269.226.9550 ext 24 Database Engineer fax 269.349.9076 Nexcerpt, Inc. http://www.nexcerpt.com ...Nexcerpt... Extend your Expertise