Enumeration of Alternative Plans
There are two main cases:
- Single-relation plans
- Multiple-relation plans
For queries over a single relation, queries consist of a combination of selects, projects, and aggregate ops:
- Each available access path (file scan / index) is considered, and the one with the least estimated cost is chosen.
- The different operations are essentially carried out together (e.g., if an index is used for a selection, projection is done for each retrieved tuple, and the resulting tuples are pipelined into the aggregate computation).