X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C485752EB8 for ; Tue, 26 Jul 2005 10:50:21 -0300 (ADT) 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 12325-06 for ; Tue, 26 Jul 2005 13:50:16 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 71A7152EC2 for ; Tue, 26 Jul 2005 10:50:16 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id j6QDoGq0015650 for ; Tue, 26 Jul 2005 13:50:16 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id j6QDo323015600 for pgsql-sql@postgresql.org; Tue, 26 Jul 2005 13:50:03 GMT (envelope-from news) From: Christopher Browne X-Newsgroups: pgsql.sql Subject: Re: REINDEX DATABASE Date: Tue, 26 Jul 2005 09:19:22 -0400 Organization: cbbrowne Computing Inc Lines: 32 Message-ID: References: <42E521DF.4000804@rusa.at> <20050725174952.GA23263@wolff.to> <42E5E90E.8090604@bankir.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, berkeley-unix) Cancel-Lock: sha1:RlOMlwTdYGpciizYfkebrXP/wLI= To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200507/227 X-Sequence-Number: 22205 > Hello > > Would you like to advice to use REINDEX DATABASE on regular basis ? > > if (yes) > how it should be connected with VACUUM FULL ANALYZE which is run > regularly ? (reindex before vacuum or vacuum before reindex?) > > else > haw to determine _when_ to run REINDEX ? If you are doing ordinary VACUUM ANALYZE frequently enough, it shouldn't be necessary to either VACUUM FULL or REINDEX. Back in the 7.2 days, there were sorts of update patterns that would mandate reindexing every so often, as you could get cases where index pages would be very sparsely populated. That was alleviated in version 7.3, I believe, and was clearly evident in 7.4. You know you need to REINDEX if analysis of an index shows that it is sparsely populated. This generally shows up if you do an analyze on the table and find an index has more pages than tuples. But if you run VACUUM reasonably frequently, this shouldn't be necessary... -- let name="cbbrowne" and tld="acm.org" in String.concat "@" [name;tld];; http://cbbrowne.com/info/rdbms.html Rules of the Evil Overlord #153. "My Legions of Terror will be an equal-opportunity employer. Conversely, when it is prophesied that no man can defeat me, I will keep in mind the increasing number of non-traditional gender roles."