From: | Joao Miguel Ferreira <joao(dot)mc(dot)ferreira(at)criticalsoftware(dot)com> |
---|---|
To: | Ben <bench(at)silentmedia(dot)com> |
Cc: | Bryan Murphy <bryan(dot)murphy(at)gmail(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Index Usage |
Date: | 2007-10-17 09:07:55 |
Message-ID: | 1192612075.4025.6.camel@azagthot.critical.pt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 2007-10-16 at 15:51 -0700, Ben wrote:
> You could take a look at pg_statio_user_indexes and/or
> pg_stat_user_indexes, if you have stats enabled....
>
> On Tue, 16 Oct 2007, Bryan Murphy wrote:
If your intention is to eliminate the unused indexes rows you should run
'vaccum' and/or 'vacuum full' and/or 'reindex'.
This also has the consequence of freing filesystem space and returning
it back to the OS.
Check it out here:
http://www.postgresql.org/docs/8.1/static/maintenance.html
chapters 22.1, 22.2 and 22.3
I use:
VACUUM FULL ANALYZE;
REINDEX INDEX yourIndex;
REINDEX TABLE yourTable
it works just great for me.
Cheers
joao
>
> > Is there a way I can track index usage over a long period of time?
> > Specifically, I'd like to identify indexes that aren't being regularly
> > used and drop them.
> >
> > Bryan
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: Don't 'kill -9' the postmaster
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
From | Date | Subject | |
---|---|---|---|
Next Message | Joris Dobbelsteen | 2007-10-17 09:10:31 | Re: newbie question |
Previous Message | Uden van Hout | 2007-10-17 08:57:51 | Possibilities of Fine Grained Access Control? |