FAQ for Assignment 5

What is the difference between "table-scan" and "index-scan"? What is the difference between "table-scan" and "one-pass-selection?"

Use these definitions: Note: Although the problem says "intermediate results produced by one operator are written to disk" it doesn't make sense to write the results of a table-scan back to disk. You can assume that the tuples produced by a table-scan are consumed by another operator without an intermediate write-back to disk.

How can there possibly be two query pans for problem 1b?

Be creative. There are multiple query plans.

What is the difference between "heuristic optimization" and "cost-based optimization?"

"Cost-based optimization" as used in class or the book is still "heuristic" in the sense that heuristics are used to estimate the likely cost of a plan, and to choose between alternatives. Thus, pushing down selections in a logical query plan is a heuristic that tends to reduce the cost by reducing the intermediate result sizes. Similarly, estimating the result size of a join requires heuristics. In problem 4, by "heuristic query optimization" we mean the whole process of query optimization described in the book and in class; this process produces "good plans" but not guaranteed optimal plans.