Sha256: 7a9067bf4b988c63610b3c6ced6d402fc0b8bdcc0ec4348adc56f5549458eb70

Contents?: true

Size: 361 Bytes

Versions: 58

Compression:

Stored size: 361 Bytes

Contents

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

SELECT c.relname AS name,
  pg_size_pretty(pg_table_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 IN ('r', 'm')
ORDER BY pg_table_size(c.oid) DESC;

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
ruby-pg-extras-5.2.5 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-5.2.4 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-5.2.3 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-5.2.2 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-5.2.1 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-5.2.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-5.1.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-5.0.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.13.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.12.2 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.12.1 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.12.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.11.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.10.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.9.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.8.1 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.7.2 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.7.1 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.7.0 lib/ruby_pg_extras/queries/table_size.sql
ruby-pg-extras-4.6.0 lib/ruby_pg_extras/queries/table_size.sql