The following queries do provide start and stop conditions for a scan of
the primary key index on the flight_id
columns in Flights
-- the where clause compares both columns with valid
-- operators to constants
WHERE flight_id = 'AA1115'
AND segment_number < 2
-- the first column is in a valid comparison
WHERE flight_id < 'BB'
-- LIKE is transformed into >= and <=, providing
-- start and stop conditions
WHERE flight_id LIKE 'AA%'