|< < 36 > >|

Translating SQL Queries into Relational Algebra

Query Blocks

The 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:

  • select
  • from
  • where
  • group by
  • having
  • order by : Outermost query only.

We are going to only discuss plans involving select, from, where and order by.

|< < 36 > >|