z-logo
open-access-imgOpen Access
Precise complexity analysis for efficient datalog queries
Author(s) -
K. Tuncay Tekle,
Yanhong A. Liu
Publication year - 2010
Publication title -
citeseer x (the pennsylvania state university)
Language(s) - English
Resource type - Conference proceedings
DOI - 10.1145/1836089.1836094
Subject(s) - datalog , computer science , query language , query optimization , sargable , set (abstract data type) , deductive database , conjunctive query , top down and bottom up design , web query classification , web search query , rdf query language , spatial query , query expansion , information retrieval , boolean conjunctive query , programming language , theoretical computer science , database , relational database , search engine
Given a set of Datalog rules, facts, and a query, answers to the query can be inferred bottom-up starting with the facts or top-down starting with the query. For efficiently answering the query, top-down evaluation is extended with tabling that stores the results of the subqueries encountered, and bottom-up evaluation is done on rules transformed based on demand from the query. This paper describes precise time and space complexity analysis for efficiently answering Datalog queries, and precise relationships between top-down evaluation with tabling and bottom-up evaluation driven by demand. We first present a systematic method for precisely calculating the worst-case time and space complexities of top-down evaluation with tabling. We then describe a method for transforming the rules for efficiently answering queries using bottom-up evaluation of the transformed rules; the method is akin to the magic set transformation, but is simpler and produces simpler rules that yield exponentially smaller space in the number of arguments of predicates. Next, we establish precise relationships between top-down evaluation with tabling and bottom-up evaluation of rules transformed based on demand. Finally, we support our analyses and comparisons through experiments on benchmarks from OpenRuleBench.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here
Accelerating Research

Address

John Eccles House
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom