From: Shaun Thomas <sthomas@peak6.com>
To: Greg Smith <greg@2ndquadrant.com>
Cc: Benjamin Krajmalnik <kraj@servoyant.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Unused indices
Date: Thu, 24 Feb 2011 13:36:32 -0600
Message-ID: <4D66B340.40307@peak6.com> (raw)
In-Reply-To: <4D669FB8.8010001@2ndquadrant.com>
References: <F4E6A2751A2823418A21D4A160B689887B0F8E@fletch.stackdump.local>
<4D65795C.20404@2ndquadrant.com>
<4D666A4F.1060205@peak6.com>
<4D669FB8.8010001@2ndquadrant.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sthomas@peak6.com, greg@2ndquadrant.com, kraj@servoyant.com
Subject: Re: Unused indices
In-Reply-To: <4D66B340.40307@peak6.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox