Two Approaches to General Selections
First approach: Find the most selective access path, retrieve tuples using it, and apply any remaining terms that don’t match the index:
- Most selective access path: An index or file scan that we estimate will require the fewest page I/Os.
- Consider city=“seattle AND phone<“543%” :
- A hash index on city can be used; then, phone<“543%” must be checked for each retrieved tuple.
- Similarly, a b-tree index on phone could be used; city=“seattle” must then be checked.