Thanks for the tip. This probably affects more people than there are people who realize it. It would be really interesting if PG would use machine learning to discover this sort of tuning on its own.
OTOH, if you speak about the general problem of optimizing configuration, then I distinctly recall having read something about automatic server configuration, IMO on AWS, but quite possibly only as a feature request.
IIRC it was an academic paper and the process was somewhat byzantine when I tried to recreate it. But the results looked good.
The authors propose a way to do some automatic tuning for MySQL and Postgres.
Link to the paper itself: http://db.cs.cmu.edu/papers/2017/tuning-sigmod2017.pdf
Clarification: this is for planning how to execute a query, not for tuning the db settings
https://docs.microsoft.com/en-us/sql/relational-databases/au...