The point about fixing the estimate before tuning the query is the one that saves the most time. When ANALYZE is fresh and the gap still shows up on a filter over two related columns, like city and postal code, CREATE STATISTICS with dependencies can close it, since the planner assumes columns are independent by default. The BEGIN and ROLLBACK warning for UPDATE is worth having at the top too.