From 80fd3f275d9bcf2c397c30ab55ec6315ec4fbfcb Mon Sep 17 00:00:00 2001 From: jsmith Date: Wed, 4 May 2022 14:52:58 +0000 Subject: [PATCH] Add 'PostgreSQL/description/indexuserates.sql' --- PostgreSQL/description/indexuserates.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 PostgreSQL/description/indexuserates.sql diff --git a/PostgreSQL/description/indexuserates.sql b/PostgreSQL/description/indexuserates.sql new file mode 100644 index 0000000..54998d3 --- /dev/null +++ b/PostgreSQL/description/indexuserates.sql @@ -0,0 +1,3 @@ +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; \ No newline at end of file