Constant propagation an join reordering are two standard optimization techniques used for Datalog programs. These techniques have typically been studied idependently of one another. However, in order to achieve constant propagation it is sometimes necessary to impose a certain join ordering on a given program. In the worst case this ordering may result in efficiencies which overcome the benefit of constant propagation. Thus the goal of conatant propagation should not necessarily be pursued to the exclusion of all else. We study this problem in the context of GraphLog, a visual languge whose queries are graphical notations which are tranlated in datalog, one which always achieves constant propagation and another which does not. We show that each tranlation can significantly outperform the other. We demonstrate this by both measuring execution times using actual application data, and by providing analytical formulae to explain the trade-off between constant propagation and join reordering.
|
|