Red Hat Database: Administrator and User's Guide | ||
---|---|---|
Prev | Chapter 12. Genetic Query Optimization (GEQO) | Next |
The GEQO module is intended for the solution of the query optimization problem similar to a traveling salesman problem (TSP). Possible query plans are encoded as integer strings. Each string represents the join order from one relation of the query to the next. For example, the query tree
/\ /\ 2 /\ 3 4 1 |
Specific characteristics of the GEQO implementation in PostgreSQL are:
Usage of a steady state GA (replacement of the least fit individuals in a population, not whole-generational replacement) allows fast convergence towards improved query plans. This is essential for query handling with reasonable time;
Usage of edge recombination crossover which is especially suited to keep edge losses low for the solution of the TSP by means of a GA;
Mutation as genetic operator is deprecated so that no repair mechanisms are needed to generate legal TSP tours.
The GEQO module allows the PostgreSQL query optimizer to support large join queries effectively through non-exhaustive search.