Sha256: 44cfa095e0dda044cc20b68f752faaa35e7107a966039d4edde1f637f179c04b

Contents?: true

Size: 284 Bytes

Versions: 80

Compression:

Stored size: 284 Bytes

Contents

/* Total size of all indexes in MB */

SELECT pg_size_pretty(sum(c.relpages::bigint*8192)::bigint) 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='i';

Version data entries

80 entries across 80 versions & 3 rubygems

Version Path
ruby-pg-extras-5.4.5 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.4.4 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.4.3 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.4.2 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.4.1 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.4.0 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.3.1 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.3.0 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.2.5 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.2.4 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.2.3 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.2.2 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.2.1 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.2.0 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.1.0 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-5.0.0 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-4.13.0 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-4.12.2 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-4.12.1 lib/ruby_pg_extras/queries/total_index_size.sql
ruby-pg-extras-4.12.0 lib/ruby_pg_extras/queries/total_index_size.sql