When a sargable predicate uses the = operator,
Derby can remove all
equijoin predicates comparing that column reference to
another simple column reference from the same query block as part of applying
transitive closure, because the
equijoin predicate is
now redundant, whether or not a new predicate was added. For example:
SELECT * FROM Flights, Flightavailability
WHERE Flights.flight_id = Flightavailability.flight_id
AND Flightavailability.flight_id = 'AA1122'