Indexing, Storage & Query Processing


Answer & solution
Answer: B (no official key was published)
1. Both plans select the same matching paid/enrolled tuples: pushing a predicate on paid.amount below the join preserves the result. Projection without DISTINCT can output the same course for two different qualifying students, so B is true under SQL bag semantics.
2. The enrolled key is (student,course), not course. C is not universal: at x=5000 all paid rows pass, and with no enrollments Plan 2 has no joined rows to test while Plan 1 still tests paid rows.
3. D is not universal either: at x=9000 Plan 1 can avoid 80% of index probes, making it faster on ordinary populated instances. Seek and transfer constants do not turn either universal performance claim into a theorem.
4. The plans/options continue on page 11.
5. Teaching check: Pushing a filter before a join can reduce work, but a universal speed claim needs more than a selectivity estimate. Course is not a key of the join output, so two qualifying students in the same course produce repeated course values after projection without DISTINCT.