Re: finding unused indexes?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "George Pavlov" <gpavlov(at)mynewplace(dot)com>
Cc: "Brad Nicholson" <bnichols(at)ca(dot)afilias(dot)info>, pgsql-sql(at)postgresql(dot)org, jim(at)contactbda(dot)com
Subject: Re: finding unused indexes?
Date: 2007-10-10 13:35:59
Message-ID: 15003.1192023359@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"George Pavlov" <gpavlov(at)mynewplace(dot)com> writes:
> so is it safe to say that an index that has
> pg_stat_user_indexes.idx_scan, pg_stat_user_indexes.idx_tup_read, and
> pg_stat_user_indexes.idx_tup_fetch all equal to 0 has not been used
> (since stats have been reset)?

> i have a bunch of those and all of them have
> pg_statio_user_indexes.idx_blks_read > 0 and most of those have
> pg_statio_user_indexes.idx_blks_hit > 0. when/why would that happen?

You have stats_block_level turned on, but not stats_tuple_level?
You have a lot of searches that find no rows?

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message George Pavlov 2007-10-10 17:13:45 Re: finding unused indexes?
Previous Message Daniel Drotos 2007-10-09 19:36:07 Re: array handling on 8.0.3