Advertisement
Anatolyukropov

Размер таблиц postgres

Mar 2nd, 2023
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. SELECT relname, pg_size_pretty(pg_total_relation_size(C.oid))
  2. FROM pg_class C
  3. LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
  4. WHERE nspname NOT IN ('pg_catalog', 'information_schema')
  5. AND C.relkind <> 'i'
  6. AND nspname !~ '^pg_toast';
Tags: Postgres
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement