Select Operator
If unsorted & no index, check against predicate:
Read tuple
While tuple doesn’t meet predicate
Read tuple
Return tuple
Sorted data: can stop after particular value encountered
Indexed data: apply predicate to index, if possible
If predicate is:
- conjunction: may use indexes and/or scanning loop above (may need to sort/hash to compute intersection)
- disjunction: may use union of index results, or scanning loop