Sha256: 107c178a6c8397b91529259ebef464af24c589646b4cb6b32f45f9c1567b640b
Contents?: true
Size: 439 Bytes
Versions: 4
Compression:
Stored size: 439 Bytes
Contents
# frozen_string_literal: true module RailsPGExtras def self.total_index_size_description "Total size of all indexes in MB" end def self.total_index_size_sql <<-EOS 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'; EOS end end
Version data entries
4 entries across 4 versions & 1 rubygems