Daniele Varrazzo writes:
> I suspect the foo.account_id statistical data are not used at all in query:
> the query planner can only estimate the number of accounts to look for, not
You mentioned you bumped your default_statistics_target.
What did you increase it to?
My data sets are so "strange" that anything less than 350 gives many bad
plans.