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 7011C528B4 for ; Tue, 21 Jun 2005 12:49:36 -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 39984-01 for ; Tue, 21 Jun 2005 15:49:31 +0000 (GMT) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by svr1.postgresql.org (Postfix) with ESMTP id C94405289B for ; Tue, 21 Jun 2005 12:49:30 -0300 (ADT) Received: from juju.arbash-meinel.com ([12.214.18.81]) by sccmmhc91.asp.att.net (sccmmhc91) with ESMTP id <20050621154929m9100nhsk9e>; Tue, 21 Jun 2005 15:49:29 +0000 Received: from [192.168.1.11] (mail [192.168.1.1]) by juju.arbash-meinel.com (Postfix) with ESMTP id ED5F755FB6; Tue, 21 Jun 2005 10:49:28 -0500 (CDT) Message-ID: <42B83708.2050706@arbash-meinel.com> Date: Tue, 21 Jun 2005 10:49:28 -0500 From: John A Meinel User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Yves Vindevogel Cc: pgsql-performance@postgresql.org Subject: Re: Another question on indexes (drop and recreate) References: <098952ec5af9b040acb9b6b5af743abd@implements.be> <42B830B3.6060902@arbash-meinel.com> <821370985653dc1f4166ca634f642ce2@implements.be> In-Reply-To: <821370985653dc1f4166ca634f642ce2@implements.be> X-Enigmail-Version: 0.92.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDC9B690B7209D4F383B957EE" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.036 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/396 X-Sequence-Number: 13033 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDC9B690B7209D4F383B957EE Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Yves Vindevogel wrote: > And, after let's say a week, would that index still be optimal or > would it be a good idea to drop it in the weekend and recreate it. It depends a little bit on the postgres version you are using. If you are only ever adding to the table, and you are not updating it or deleting from it, I think the index is always optimal. Once you start deleting from it there are a few cases where older versions would not properly re-use the empty entries, requiring a REINDEX. (Deleting low numbers and always adding high numbers was one of the cases) However, I believe that as long as you vacuum often enough, so that the system knows where the unused entries are, you don't ever have to drop and re-create the index. John =:-> --------------enigDC9B690B7209D4F383B957EE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuDcIJdeBCYSNAAMRAvYLAKC9HjuwOubPauAe3173lo55TrOtCQCfc9Pe PD/Kqw6CxdGoukglvyvG1pU= =xRWH -----END PGP SIGNATURE----- --------------enigDC9B690B7209D4F383B957EE--