Complexity of Evaluating GQL Queries
Diego Figueira, Anthony W. Lin, Liat Peterfreund

TL;DR
This paper determines the exact computational complexity of evaluating GQL queries over graph databases, revealing it is generally $ ext{P}^{ ext{NP}[ ext{log}]}$-complete and NL-complete under restrictions, using finite model theory techniques.
Contribution
It provides the first complete complexity classification of GQL query evaluation, including cases with infinite domains, connecting GQL to established logical frameworks.
Findings
Data complexity of GQL is $ ext{P}^{ ext{NP}[ ext{log}]}$-complete in general.
When restrictors are disallowed, complexity reduces to NL-complete.
Results hold even with infinite domains like real numbers.
Abstract
GQL has recently emerged as the standard query language over graph databases (particularly, the property graph model). Indeed, this is analogous to the role of SQL for relational databases. Unlike SQL, however, fundamental problems regarding GQL are hitherto still unsolved, most notably the complexity of query evaluation. In this paper we provide a complete solution to this problem. In particular, we show that the data complexity of GQL is -complete in general, and is -complete, when the so-called ``restrictors'' are disallowed. Using techniques from embedded finite model theory, we show that this is true, even when the queries use data from infinite concrete domains (for example the domain of real numbers where arithmetic is allowed in the query). In proving these results, we establish and exploit tight connections between GQL and query languages…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
