4 ms·
Whenever I see query planning in databases, I immediately think that artificial intelligence should be able to do this pretty well. Which databases out there ac
by mbalex99 4y ago
Whenever I see query planning in databases, I immediately think that artificial intelligence should be able to do this pretty well. Which databases out there actually use some sort of AI to create a plan and execute?
- pjungwir 4y agoPostgres 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