Translating SQL Queries into Relational AlgebraQuery BlocksThe first heuristic applies very early: Decompose a query into query blocks. Optimize the blocks independently, and then combine the resulting execution plans. A query block is composed of the following:
We are going to only discuss plans involving select, from, where and order by. |