Index device identifiers and question identifiers in db