From: | "Jim Buttafuoco" <jim(at)contactbda(dot)com> |
---|---|
To: | "George Pavlov" <gpavlov(at)mynewplace(dot)com>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: finding unused indexes? |
Date: | 2006-08-01 16:10:01 |
Message-ID: | 20060801160934.M4017@contactbda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
check out pg_stat_user_indexes, you will need to turn on the stats collection in your postgresql.conf file first.
Jim
---------- Original Message -----------
From: "George Pavlov" <gpavlov(at)mynewplace(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Sent: Tue, 1 Aug 2006 09:05:34 -0700
Subject: [SQL] finding unused indexes?
> Anybody have a clever way to quickly find whether there are any unused
> indexes in a PG DB? One way I have done is to take queries from the DB
> log, prepend an explain to each and grep the results, but I am wondering
> if there are either any index usage stats maintained somewhere inside
> Postgres or if there is a slicker/less cumbersome way of doing it. Also
> indexes used by functions are hard to simulate that way.
>
> George
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
------- End of Original Message -------
From | Date | Subject | |
---|---|---|---|
Next Message | Brad Nicholson | 2006-08-01 16:11:47 | Re: finding unused indexes? |
Previous Message | George Pavlov | 2006-08-01 16:05:34 | finding unused indexes? |