Sha256: 95d1a0de238eebd44ffb8ddbb3f231dda1fc2a74bc6d1e03a6f23f9e7981e55d

Contents?: true

Size: 369 Bytes

Versions: 13

Compression:

Stored size: 369 Bytes

Contents

/* Size of the tables (including indexes), descending by size */

SELECT c.relname AS name,
  pg_size_pretty(pg_total_relation_size(c.oid)) AS size
FROM pg_class c
LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
AND n.nspname !~ '^pg_toast'
AND c.relkind='r'
ORDER BY pg_total_relation_size(c.oid) DESC;

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
ruby-pg-extras-1.1.0 lib/ruby-pg-extras/queries/total_table_size.sql
ruby-pg-extras-1.0.0 lib/ruby-pg-extras/queries/total_table_size.sql
ruby-pg-extras-0.7.0 lib/ruby-pg-extras/queries/total_table_size.sql
pg-stats-1.0.0 queries/total-table-size.sql
ruby-pg-extras-0.6.2 lib/ruby-pg-extras/queries/total_table_size.sql
ruby-pg-extras-0.6.1 lib/ruby-pg-extras/queries/total_table_size.sql
ruby-pg-extras-0.6.0 lib/ruby-pg-extras/queries/total_table_size.sql
ruby-pg-extras-0.0.3 lib/ruby-pg-extras/queries/total_table_size.sql
ruby-pg-extras-0.0.2 lib/ruby-pg-extras/queries/total_table_size.sql
ruby-pg-extras-0.0.1 lib/ruby-pg-extras/queries/total_table_size.sql
rails-pg-extras-0.5.2 lib/rails-pg-extras/queries/total_table_size.sql
rails-pg-extras-0.5.1 lib/rails-pg-extras/queries/total_table_size.sql
rails-pg-extras-0.5.0 lib/rails-pg-extras/queries/total_table_size.sql