The OQL Optimizer
The OQL optimizer and the ODB DBMS are described in detail in
the paper: "An Experimental Optimizer for OQL".
The following web pages sumarize some of the differences between the paper and the actual system and present some examples:
The optimizer consists of the following stages:
- Stage 1: normalization of comprehensions.
- Stage 2: normalization of predicates.
- Stage 3: translation into joins and unnests, and unesting nested queries.
- Stage 4: materialization of path expressions.
- Stage 5: join permutation.
- Stage 6: plan generation.
The ODB source files are the following:
- basic.h: The Expr class to represent terms, the list templates, etc.
- oql.y: The yacc grammar for the oql syntax.
- oql.lex: The lex scanner to parse tokens.
- typecheck.h/typecheck.gen: The typechecking program.
- optimizer.gen: The actual optimizer.
- evaluation.h/evaluation.gen: The in-memory evaluator.
- constant.h/constant.cc: Definition of some system functions (e.g., +, *).
- test.oql: A simple schema, data, and a sample of few OQL queries against the schema.
- main.cc: The main program.
- database: The actual database state.
- common.cc: it is included in optimizer.gen; it contains code for memoization and tracing.
Files *_out.cc and *_str.h are generated automatically by the compiler.
Last modified: 7/21/97 by Leonidas Fegaras