sort in db and sort everywhere