Editing Template:Table size
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
FROM ( | FROM ( | ||
SELECT | SELECT | ||
− | + | pg_catalog.pg_namespace.nspname AS schema_name, | |
relname, | relname, | ||
− | + | pg_relation_size(pg_catalog.pg_class.oid) AS table_size | |
FROM pg_catalog.pg_class | FROM pg_catalog.pg_class | ||
JOIN pg_catalog.pg_namespace ON relnamespace = pg_catalog.pg_namespace.oid | JOIN pg_catalog.pg_namespace ON relnamespace = pg_catalog.pg_namespace.oid | ||
) t | ) t | ||
− | WHERE | + | WHERE schema_name NOT LIKE 'pg_%' |
ORDER BY table_size DESC; | ORDER BY table_size DESC; |
Advertising: