Last active
March 23, 2017 14:09
-
-
Save areguig/32c60d96b1e93b3b0f522f8a015ec7a2 to your computer and use it in GitHub Desktop.
show indexes usage
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
SELECT relname, 100 * idx_scan / (seq_scan + idx_scan) percent_of_times_index_used, | |
n_live_tup rows_in_table | |
FROM pg_stat_user_tables | |
ORDER BY n_live_tup DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment