|< < 46 > >|

Transforming Relational Algebra Expressions

Query optimization is:

  • A series of transformations of relational algebra expressions,
  • Guided by a cost model.

There are two kinds of transformations:

  • Substitute one implementation for another. E.g. replace SelectScan by SelectIndex.

  • Rewrite part of the query plan based on an equivalence. E.g.
    select( join(R, S), predicate on R)

    is equivalent to:
    join( select(R, predicate on R), S)

|< < 46 > >|