Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 1D97F9FA6B5 for ; Wed, 17 Jan 2007 12:39:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 80259-07 for ; Wed, 17 Jan 2007 12:39:15 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tinlc.com (unknown [72.18.206.65]) by postgresql.org (Postfix) with ESMTP id 6CCEC9FA25C for ; Wed, 17 Jan 2007 12:39:15 -0400 (AST) Received: from [127.0.0.1] (helo=localhost) by tinlc.com with smtp (Exim 4.60) (envelope-from ) id 1H7Drg-000061-De; Wed, 17 Jan 2007 11:42:20 -0500 From: "Greg Sabino Mullane" To: pgsql-general@postgresql.org Cc: bruce@momjian.us CC: bruce@momjian.us Subject: Re: Index bloat of 4x X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <20070117093223.bcdb302e.wmoran@collaborativefusion.com> Date: Wed, 17 Jan 2007 16:42:20 -0000 X-Mailer: JoyMail 2.01 Message-ID: <19dcd19103d2e8b6656dac44879e2fcb@biglumber.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/906 X-Sequence-Number: 107446 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Today I decided to run reindex during a slow period, and was shocked to > find the database size drop from 165M to 30M. Keep in mind that the > 165M is after vacuum full. So, apparently, there was 135M of index bloat? > That seems a little excessive to me, especially when the docs claim that > reindexing is usually not necessary. For what its worth, I've seen far worse. > I guess my question is whether or not this is expected. It's obviously > not a good thing -- I've noticed that shared buffer usage has dropped > dramatically as well (from 28,000 to 7000). I hadn't expected index > bloat of this magnitude, and I'm concerned about when the database hits > 2 or 3 G in size and has 12G just in indexes that take hours to rebuild. Regular reindexing is so inexpensive compared to vacuum, I recommend adding it in as part of your regular maintenance. At the very least, it's unlikely to ever be that severe again unless you don't reindex for an equally long period of time. Come to think of it, an auto-reindex option might be nice in core someday. TODO item? - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200701171129 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iD8DBQFFrlDivJuQZxSWSsgRAvNnAJ9fJ+U6cyyO382HiZtp8LE5drcpOgCgwlW5 EbOS7Gbg/DYOgXeG7vUIlhY= =9E8g -----END PGP SIGNATURE-----