4c186c36b0d1f7593b467c82caa64033deefabec
[WebKit-https.git] / Websites / test-results / size-database.sql
1 SELECT
2     table_name,
3     pg_size_pretty(table_size) AS table_size,
4     pg_size_pretty(indexes_size) AS indexes_size,
5     pg_size_pretty(total_size) AS total_size
6 FROM (
7     SELECT
8         table_name,
9         pg_table_size(table_name) AS table_size,
10         pg_indexes_size(table_name) AS indexes_size,
11         pg_total_relation_size(table_name) AS total_size
12     FROM (
13         SELECT ('"' || table_schema || '"."' || table_name || '"') AS table_name
14         FROM information_schema.tables
15     ) AS all_tables
16     ORDER BY total_size DESC
17 ) AS pretty_sizes
18