X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D61D5D1B470 for ; Fri, 28 Nov 2003 05:19:00 +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 77579-08 for ; Fri, 28 Nov 2003 01:18:30 -0400 (AST) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id D060CD1B44D for ; Fri, 28 Nov 2003 01:18:28 -0400 (AST) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 675589; Thu, 27 Nov 2003 21:16:17 -0800 Message-ID: <3FC6DA2F.3010809@joeconway.com> Date: Thu, 27 Nov 2003 21:16:31 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David F. Skoll" Cc: pgsql-admin@postgresql.org Subject: Re: PostgreSQL index quesiton for version < 7.4 References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/469 X-Sequence-Number: 11456 David F. Skoll wrote: > For PG < 7.4, does the index grow without the free space being > reclaimed? I believe so. > Would this affect performance substantially? Yes, it could. > I have had reports from customers who said our applications speed > improved tremendously after a database dump/drop/recreate/restore > recycle. (We do run VACUUM ANALYZE regularly, so it's not the lack > of that that would cause it to slow down.) As a less severe measure, you could also use REINDEX. See: http://www.postgresql.org/docs/7.3/static/sql-reindex.html Also, there is a contrib/reindexdb, which I believe assists you in reindexing all tables in a database. > > Will PG 7.4 improve the performance if this is indeed a problem? I should think so. You need to be sure you freespace map settings are up to snuff. Here's the 7.4 doc for REINDEX: http://www.postgresql.org/docs/current/static/routine-reindex.html which basically says the need to reindex has been reduced. Here's the freespace map reference: http://www.postgresql.org/docs/current/static/runtime-config.html 16.4.2.2. Free Space Map max_fsm_pages (integer) Sets the maximum number of disk pages for which free space will be tracked in the shared free-space map. Six bytes of shared memory are consumed for each page slot. This setting must be more than 16 * max_fsm_relations. The default is 20000. This option can only be set at server start. max_fsm_relations (integer) Sets the maximum number of relations (tables and indexes) for which free space will be tracked in the shared free-space map. Roughly fifty bytes of shared memory are consumed for each slot. The default is 1000. This option can only be set at server start. HTH, Joe