\prompt'This utility will read indexes with given mask using pgstattuple extension and return top 100 bloated indexes.\nWARNING: without index mask query will read all available indexes which could cause I/O spikes.\nPlease enter mask for index name (check all indexes if nothing is specified): 'indexname
withindexesas(
select*frompg_stat_user_indexes
)
selectschemaname,
table_name,
selecttable_name,
pg_size_pretty(table_size)astable_size,
index_name,
pg_size_pretty(index_size)asindex_size,
@ -12,8 +11,9 @@ idx_scan as index_scans,
@@ -12,8 +11,9 @@ idx_scan as index_scans,
\prompt'This utility will read tables with given mask using pgstattuple extension and return top 20 bloated tables.\nWARNING: without table mask query will read all available tables which could cause I/O spikes.\nPlease enter mask for table name (check all tables if nothing is specified): 'tablename