Sha256: dae490e88ebf6a5d6e5d100c15b123e58a0bca539ec2f52e712cfd4fab6abe29
Contents?: true
Size: 503 Bytes
Versions: 30
Compression:
Stored size: 503 Bytes
Contents
/* Calculates your cache hit rate for reading tables */ SELECT relname AS name, heap_blks_hit AS buffer_hits, heap_blks_read AS block_reads, heap_blks_hit + heap_blks_read AS total_read, CASE (heap_blks_hit + heap_blks_read)::float WHEN 0 THEN 'Insufficient data' ELSE (heap_blks_hit / (heap_blks_hit + heap_blks_read)::float)::text END ratio FROM pg_statio_user_tables WHERE schemaname = '%{schema}' ORDER BY heap_blks_hit / (heap_blks_hit + heap_blks_read + 1)::float DESC;
Version data entries
30 entries across 30 versions & 1 rubygems