Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D43F51337BBB for ; Thu, 24 Feb 2011 15:36:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 43323-01 for ; Thu, 24 Feb 2011 19:36:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.peak6.com (smtp2.peak6.com [38.98.137.9]) by mail.postgresql.org (Postfix) with ESMTP id 45A381337B4E for ; Thu, 24 Feb 2011 15:36:33 -0400 (AST) X-AuditID: 0a02cb1e-b7bf8ae00000096d-90-4d66b340d2ec Message-ID: <4D66B340.40307@peak6.com> Date: Thu, 24 Feb 2011 13:36:32 -0600 From: Shaun Thomas Reply-To: sthomas@peak6.com Organization: Peak6 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: Greg Smith CC: Benjamin Krajmalnik , "pgsql-performance@postgresql.org" Subject: Re: Unused indices References: <4D65795C.20404@2ndquadrant.com> <4D666A4F.1060205@peak6.com> <4D669FB8.8010001@2ndquadrant.com> In-Reply-To: <4D669FB8.8010001@2ndquadrant.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed content-transfer-encoding: 7bit X-Brightmail-Tracker: AAAAAQAAAZE= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/474 X-Sequence-Number: 42612 On 02/24/2011 12:13 PM, Greg Smith wrote: > That's not quite the right filter. You want to screen out > everything that isn't a unique index, not just the primary key ones. > You probably can't drop any of those without impacting database > integrity. Ah yes. I was considering adding the clause for unique indexes. Filthy constraint violations. > Also, as a picky point, you really should use functions like > pg_relation_size instead of doing math on relpages. You know, I always think about that, but I'm essentially lazy. :) I personally haven't ever had the old *8 trick fail, but from your perspective of working with so many variations, I could see how you'd want to avoid it. I'll be good from now on. ;) -- 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.php for terms and conditions related to this email