/*Query to check Table Size*/
———————————————————————————————————–
SELECT relnamespace::regclass, relname,pg_size_pretty(pg_relation_size(pg_class.oid, ‘main’)) as main, pg_size_pretty(pg_relation_size(pg_class.oid,’fsm’)) as fsm, pg_size_pretty(pg_relation_size(pg_class.oid, ‘vm’)) as vm, pg_size_pretty(pg_relation_size(pg_class.oid, ‘init’)) as init, pg_size_pretty(pg_table_size(pg_class.oid)) as table, pg_size_pretty(pg_indexes_size(pg_class.oid)) as indexes, pg_size_pretty(pg_total_relation_size(pg_class.oid)) as total FROM pg_class WHERE relkind=’r’ ORDER BY pg_total_relation_size(pg_class.oid) DESC LIMIT 10;
No comments:
Post a Comment