An Efficient Strategy for the Bottom-up Evaluation of Datalog Queries