Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 75F01B5DC0A for ; Wed, 21 Sep 2011 10:30:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 45016-08 for ; Wed, 21 Sep 2011 13:30:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from smtp2.peak6.com (smtp2.peak6.com [38.98.137.9]) by mail.postgresql.org (Postfix) with ESMTP id AF7CDB5DC09 for ; Wed, 21 Sep 2011 10:30:42 -0300 (ADT) X-AuditID: 0a02cb1e-b7bf4ae000000d2a-8b-4e79e70327f5 Message-ID: <4E79E702.4090405@peak6.com> Date: Wed, 21 Sep 2011 08:30:42 -0500 From: Shaun Thomas Reply-To: Organization: Peak6 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: AI Rumman CC: Subject: Re: REINDEX not working for wastedspace References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed content-transfer-encoding: 7bit X-Originating-IP: [10.10.220.61] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrIIsWRmVeSWpSXmKPExsXCxcQrpsvyvNLPoPkll8X1meeYLT70Bjgw eeycdZfd48K+aewBTFENjDaJeXn5JYklqQopqcXJtkoBro7eZgrBJYl5KYlFKQoumcXJOYmZ ualFSgqZKbZKRkoKBTmJyam5qXkltkqJBQWpeSlKdlwKGMAGqCwzTyE1Lzk/JTMv3VbJM9hf 18LC1FLXUMkuHgESulkyVh39xFiwjL3i6VebBsbXrF2MnBwSAiYSR+8eZYGwxSQu3FvPBmLz CmhIfJj5BSjOwcEioCqx+JI0SJhNQE1i4e6bjCC2kICsxP5V58DG8AsIS+z70MQMYosKBEgs mPSWEWKMoMTJmU/AxosIKEvMOzsNbDwz0Jy5DyeB9QoLWEnMv74GamaAxJE7z8FqOAUCJS4t uAxVbytxYc51FghbXmL72znMEPVyEncaQOo5gM5XkLi+3H8Co9AsJJtnIemehaR7ASPzKkbx 4rLE5IxMs4Li3JICQ72C1MRsM7281JJNjOCIPS23g3HFBcVDjAIcjEo8vBOOVfgJsSaWFVfm HmKU4GBWEuHtv1PpJ8SbklhZlVqUH19UmpNafIhRGxhiE5mluJPzgckkryTe2MBASZw36U+m n5BAOjAFZKemFqQWwVQzcXBKNTBOM7jJu/pzxc5r/3m35vCejuIpN88+m+Nkm3bGuV6gv4x9 7jtJDuMdZkdK/1QoPuljszszp3jGrce3Dc696bbr1L7CnbV67wLF0ue/z15KLlpc9qVqlZm+ /My86p+P+bgubL0Z/5NJ73iVifIbkwkzSzdX5nSf6T4XsPX7hlV6HubympL+Zq+UWIozEg21 mIuKEwEyI4qH5AIAAA== X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/316 X-Sequence-Number: 45092 On 09/21/2011 02:01 AM, AI Rumman wrote: > Using the query http://wiki.postgresql.org/wiki/Show_database_bloat, > I got the following result for a table: God. I wish they would erase that Wiki page, or at least add a disclaimer. That query is no better than a loose estimate. Never, ever, ever depend on it for critical information about your tables. Ever. Ever. With that said, there are a lot of ways which can get the information you want. One is the pgstattuple contrib, the other is the pg_freespacemap contrib (though that didn't get really useful until 8.4 and above). Check out those documentation pages for usage info. More importantly, ignore the results of that query. It's wrong. If you've just reindexed, those indexes are about as small as they're ever going to be. -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604 312-676-8870 sthomas@peak6.com ______________________________________________ See http://www.peak6.com/email-disclaimer/ for terms and conditions related to this email