# Order-Dependent Complexity of Enumeration and Direct Access for Conjunctive Queries on Dynamic Data

DevFeed: [Order-Dependent Complexity of Enumeration and Direct Access for Conjunctive Queries on Dynamic Data](<https://devfeed.tech/articles/order-dependent-complexity-of-enumeration-and-direct-access-for-conjunctive-queries-on-dynamic-data-115961.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.04519>)

Author: Antoine Amarilli, Nofar Carmeli, Cl\\'emence Dumoulin

Published: 2026-11-04T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Databases](<https://devfeed.tech/sources/arxiv-databases.md>)

Topics: [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [cs-db](<https://devfeed.tech/tags/cs-db.md>), [database](<https://devfeed.tech/tags/database.md>), [dynamic-data](<https://devfeed.tech/tags/dynamic-data.md>), [enumeration](<https://devfeed.tech/tags/enumeration.md>), [hierarchy](<https://devfeed.tech/tags/hierarchy.md>), [lower-bound](<https://devfeed.tech/tags/lower-bound.md>), [order](<https://devfeed.tech/tags/order.md>), [queries](<https://devfeed.tech/tags/queries.md>), [ranking](<https://devfeed.tech/tags/ranking.md>), [update](<https://devfeed.tech/tags/update.md>), [variables](<https://devfeed.tech/tags/variables.md>)

## AI overview

For dynamic conjunctive queries, ranked enumeration and direct access have efficient bounds when the requested lexicographic order is hierarchy-consistent. The proposed algorithms use linear preprocessing and logarithmic update time; enumeration provides constant delay, while retrieving the k-th tuple takes logarithmic access time. For non-hierarchy-consistent orders, the note establishes a lower bound for ranked direct access under updates. The abstract does not specify that lower bound's form.

## Source excerpt

arXiv:2611.04519v1 Announce Type: new Abstract: This note studies the fine-grained complexity of ranked enumeration and ranked direct access of conjunctive query answers over a dynamic database. We focus on lexicographically sorted answers, defined by an ordering on the query's free variables. From the literature, when no particular order is required, we know that when the query is self-join-free and q-hierarchical, we can build a data structure for enumeration (resp. direct access) with linear (resp. linearithmic) preprocessing and constant (resp. logarithmic) update time in the size of the database. For enumeration (resp. direct access), this data structure yields an algorithm that enumerates all query answers (resp. that returns the $k$-th query answer) with constant delay (resp. logarithmic access time). Our goal is to extend these results to ranked enumeration and ranked direct access, with the ranking function defined by a lexicographic order. We define a property on the order over the variables of $Q$, which we call being hierarchy-consistent. Given a user-specified query and hierarchy-consistent order, we first propose, for ranked enumeration under updates, an algorithm with linear preprocessing and logarithmic update time that enumerates all the query answers according to the user-specified order with constant delay. Moreover, for ranked direct access under updates, we propose an algorithm with linear preprocessing and logarithmic update time that returns the $k$-th tuple according to the user-specified order with logarithmic access time. In contrast, given a user-specified query and non-hierarchy-consistent order, we show a lower bound for ranked direct access under updates.