Estimating the cost of GraphLog queries
C Saavedra Escalante, R. Nigel Horspool · 2002
The efficiency of query execution in a logic program depends very strongly on the order in which subgoals are evaluated. If a suitable evaluation order is chosen, the number of alternatives to be explored is reduced, and the overall efficiency may be improved. We present a cost model that estimates the number of solutions associated with GraphLog queries, based on a probabilistic approach. The inclusion of transitive closure and recursion is also discussed.