English

Space-Time Tradeoffs for Spatial Conjunctive Queries

Databases 2025-09-15 v1

Abstract

Given a conjunctive query and a database instance, we aim to develop an index that can efficiently answer spatial queries on the results of a conjunctive query. We are interested in some commonly used spatial queries, such as range emptiness, range count, and nearest neighbor queries. These queries have essential applications in data analytics, such as filtering relational data based on attribute ranges and temporal graph analysis for counting graph structures like stars, paths, and cliques. Furthermore, this line of research can accelerate relational algorithms that incorporate spatial queries in their workflow, such as relational clustering. Known approaches either have to spend O~(N)\tilde{O}(N) query time or use space as large as the number of query results, which are inefficient or unrealistic to employ in practice. Hence, we aim to construct an index that answers spatial conjunctive queries in both time- and space-efficient ways. In this paper, we establish lower bounds on the tradeoff between answering time and space usage. For kk-star (resp. kk-path) queries, we show that any index for range emptiness, range counting or nearest neighbor queries with TT answering time requires Ω(N+NkTk)\Omega\left(N+\frac{N^k}{T^k}\right) (resp. Ω(N+N2T2/(k1))\Omega\left(N+\frac{N^2}{T^{2/(k-1)}}\right)) space. Then, we construct optimal indexes for answering range emptiness and range counting problems over kk-star and kk-path queries. Extending this result, we build an index for hierarchical queries. By resorting to the generalized hypertree decomposition, we can extend our index to arbitrary conjunctive queries for supporting spatial conjunctive queries. Finally, we show how our new indexes can be used to improve the running time of known algorithms in the relational setting.

Keywords

Cite

@article{arxiv.2509.10050,
  title  = {Space-Time Tradeoffs for Spatial Conjunctive Queries},
  author = {Aryan Esmailpour and Xiao Hu and Stavros Sintos},
  journal= {arXiv preprint arXiv:2509.10050},
  year   = {2025}
}
R2 v1 2026-07-01T05:33:08.618Z