upvote
There are papers and Postgres projects that attempt this kind of learning-based optimization, with some success. None are in widespread use. (One part, but certainly not the entirety, of the problem is that it's not just A/B, it's an exponential number of options that all could seem close to each other.)
reply
You can and some databases can do this (e.g. Oracle).
reply
Customers love it when their queries sometimes run a lot longer.
reply