Created
January 21, 2017 04:03
-
-
Save chrisledet/88bca9c73a569d082a982afea018072c to your computer and use it in GitHub Desktop.
View indices usage in PostgreSQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- filter by table name | |
select indexrelname, idx_scan, idx_tup_read, idx_tup_fetch from pg_stat_user_indexes where relname = '<TABLE NAME>'; | |
-- filter by index name | |
select idx_scan, idx_tup_read, idx_tup_fetch from pg_stat_user_indexes where indexrelname = '<IDX NAME>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment