Plans for Single-Relation Queries(Prep for Join ordering)
Task: create a query execution plan for a single Select-project-join-group-by block.
Key idea: consider each possible access path to the relevant tuples of the relation. Choose the cheapest one.
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).