Eliminate n+1 query in flights search