1 <& /elements/header-popup.html, {
2 'title' => 'Database size details',
6 <& /search/elements/search.html,
7 'name_singular' => 'table',
8 'header' => [ 'Table', 'Size' ],
10 'count_query' => $count_query,
14 <& /elements/footer-popup.html &>
19 SELECT table_name, pg_size_pretty(total_bytes) AS total
22 SELECT relname AS TABLE_NAME,
23 pg_total_relation_size(c.oid) AS total_bytes
25 LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
27 AND nspname = 'public'
29 ) a order by total_bytes desc
33 SELECT count(*) FROM pg_class c
34 LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
36 AND nspname = 'public'