let the db do the sorting