diff --git a/PostgreSQL/description/index_usage_by_scans.sql b/PostgreSQL/description/index_usage_by_scans.sql index 9678fbc..e6f1768 100644 --- a/PostgreSQL/description/index_usage_by_scans.sql +++ b/PostgreSQL/description/index_usage_by_scans.sql @@ -16,4 +16,4 @@ FROM LEFT JOIN pg_stat_all_indexes psai ON i.indexrelid = psai.indexrelid WHERE t.schemaname NOT IN ('pg_catalog', 'information_schema') -ORDER BY psai.idx_scan DESC; \ No newline at end of file +ORDER BY number_of_scans DESC; \ No newline at end of file