Postgres: Index size

select relid::regclass as table, indexrelid:: regclass as index,
pg_relation_size(indexrelid::regclass) as index_size_bytes
from pg_stat_user_indexes
ORDER BY index_size_bytes
LIMIT 10;;



select relid::regclass as table, indexrelid:: regclass as index,
pg_size_pretty(pg_relation_size(indexrelid::regclass)) as index_size
from pg_stat_user_indexes
LIMIT 10;;

No comments:

Post a Comment