For this two queries You should have two indexes : first (id) and second (group,id).