Skip to content

Instantly share code, notes, and snippets.

View KeynesYouDigIt's full-sized avatar
🥑
Currently thinking about how completely unnecessary a "status" is for git hub

Vincent Buscarello KeynesYouDigIt

🥑
Currently thinking about how completely unnecessary a "status" is for git hub
  • arturo.ai
  • United States
  • 10:21 (UTC -12:00)
View GitHub Profile
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans