3 ms·
Postgres does. :-) At least if genetic algorithms count as AI. If there are a lot of tables in the query, Postgres will switch to its GEQO planner [0]. The hard
by pjungwir 4y ago
Postgres does. :-) At least if genetic algorithms count as AI. If there are a lot of tables in the query, Postgres will switch to its GEQO planner [0]. The hardest thing about planners is they need to make a decision fast. It would be silly if they took longer than the marginal improvement over a worse plan. And since the possible ways to join tables grows exponentially, an exhaustive comparison quickly becomes impractical.
[0] https://www.postgresql.org/docs/current/geqo.html https://www.postgresql.org/docs/current/geqo.html