DB: implement find by priority