We don't use PostgresSQL (yet), but have had issues with random production outages due to planner suddenly deciding to do dumb stuff like full table scans instead of using an index.
To avoid having to sprinkle hints all over, we've added a background job that forces recalculation of statistics once a week or so...
To avoid having to sprinkle hints all over, we've added a background job that forces recalculation of statistics once a week or so...