you don't need to check someone's face against the entire
passport database, only against the passports which have
been checked into the flight
Even simpler than that, some UK airports have 'epassport gates' * [1] where you present your passport on a scanner and your face is photographed at the same time, so it only needs to compare your face against your passport.
Sadly the gates are still slow and unreliable, even at that seemingly simple task.
Sadly the gates are still slow and unreliable, even at that seemingly simple task.
* Admittedly for immigration rather than boarding [1] https://en.wikipedia.org/wiki/EPassport_gates