Memory-Saving Evaluation Plans for Datalog