Logical (Heuristic) Query Optimization¶
-
Break up conjunctive selection predicates
-
Push selections down
-
Introduce joins by combining selections and cross products
-
Determine join order
Heuristic: execute joins with input from selections before executing other joins
-
Introduce and push down projections
Not always useful
Rules of thumb
- Perform selections as early as possible
- Perform projections as early as possible
The optimization process
- Generate initial query plan from SQL statement
- Transform query plan into more efficient query plan via a series of modifications, each of which hopefully reducing execution time
Last update:
June 1, 2020