I hereby claim:
- I am saifulmuhajir on github.
- I am saifulmuhajir (https://keybase.io/saifulmuhajir) on keybase.
- I have a public key ASBsER-xSawaUXntzzUCRbLqAKiSeO1QIQ_mDWvf8nmDuQo
To claim this, I am signing this object:
WITH idx_hit_rate as ( | |
SELECT relname as table_name, n_live_tup, | |
round(100.0 * idx_scan / GREATEST(1,(seq_scan + idx_scan)),2) as idx_hit_rate | |
FROM pg_stat_user_tables | |
ORDER BY n_live_tup DESC | |
), | |
cache_hit_rate as ( | |
SELECT relname as table_name, heap_blks_read + heap_blks_hit as reads, | |
round(100.0 * sum (heap_blks_read + heap_blks_hit) over (ORDER BY heap_blks_read + heap_blks_hit DESC) / sum(heap_blks_read + heap_blks_hit) over (),4) as cumulative_pct_reads, | |
round(100.0 * heap_blks_hit / GREATEST(1,(heap_blks_hit + heap_blks_read)),2) as cache_hit_rate |
WITH table_opts AS ( | |
SELECT pg_class.oid, relname, nspname, array_to_string(reloptions, '''') AS relopts | |
FROM pg_class | |
INNER JOIN pg_namespace ns ON relnamespace = ns.oid), | |
analyze_settings AS ( | |
SELECT oid, relname, nspname, | |
CASE | |
WHEN relopts LIKE ''%autovacuum_analyze_threshold%'' | |
THEN substring(relopts, ''.*autovacuum_analyze_threshold=([0-9.]+).*'')::integer | |
ELSE current_setting(''autovacuum_analyze_threshold'')::integer |
WITH table_opts AS ( | |
SELECT | |
pg_class.oid, relname, nspname, array_to_string(reloptions, '') AS relopts | |
FROM | |
pg_class INNER JOIN pg_namespace ns ON relnamespace = ns.oid | |
), vacuum_settings AS ( | |
SELECT | |
oid, relname, nspname, | |
CASE | |
WHEN relopts LIKE '%autovacuum_vacuum_threshold%' |
I hereby claim:
To claim this, I am signing this object:
Verifying I am +asm on my passcard. https://onename.com/asm |