Here you are retrieving all records from the database and then evaluating each of them. That works for 5 records, but not for 5000 (let alone all-the-records :)

BTW, It's impressive how you used the `<=>`

How could we use the database to tell use to return the records we wanted?