pg_stat_user_indexes view clarification - Mailing list pgsql-admin

From Jeff Frost
Subject pg_stat_user_indexes view clarification
Date
Msg-id Pine.LNX.4.64.0601301319520.14339@discord.dyndns.org
Whole thread Raw
Responses Re: pg_stat_user_indexes view clarification  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Can someone set me straight on whether the following statements are true in
postgresql-8.1.x and if they aren't true, what queries might I need to run to
find these answers?

Also would be interested to know if these changed in a certain version of
postgresql.

The following query shows all indexes which are not used.

select schemaname,relname,indexrelname,idx_tup_read,idx_tup_fetch from
pg_stat_user_indexes where idx_tup_read = 0;


The following query shows all indexes which have differing values between
idx_tup_read and idx_tup_fetch indicating indexes which likely need rebuilt
via REINDEX:

select schemaname,relname,indexrelname,idx_tup_read,idx_tup_fetch from
pg_stat_user_indexes where idx_tup_read != idx_tup_fetch;


--
Jeff Frost, Owner     <jeff@frostconsultingllc.com>
Frost Consulting, LLC     http://www.frostconsultingllc.com/
Phone: 650-780-7908    FAX: 650-649-1954

pgsql-admin by date:

Previous
From: "Anjan Dave"
Date:
Subject: invalid multibyte character for locale
Next
From: Tom Lane
Date:
Subject: Re: pg_stat_user_indexes view clarification