Instance-optimal join algorithms for cyclic queries

Determine whether there exists an instance-optimal algorithm for evaluating cyclic natural join queries—namely, a join algorithm that, like the Yannakakis algorithm for α-acyclic queries, runs in time linear in the total input size plus the output size (O(N + OUT)) for every input instance.

Background

Join order optimization remains difficult due to inaccurate cardinality estimation and the vast plan search space. For α-acyclic queries, the Yannakakis algorithm achieves instance-optimal complexity O(N + OUT) by performing full semi-join reductions before joins, guaranteeing robustness irrespective of join order.

Predicate Transfer (PT) accelerates semi-join reductions with Bloom filters, and this paper’s Robust Predicate Transfer (RPT) adds LargestRoot and SafeSubjoin to provide join-order robustness with strong guarantees for acyclic queries. However, for cyclic queries, existing approaches (including PT/RPT) lack comparable guarantees; worst-case optimal join algorithms provide bounds based on query width measures rather than instance-specific O(N + OUT). The paper explicitly notes that it remains unknown whether an instance-optimal join algorithm exists for cyclic queries.

References

Despite our promising results in achieving practical join order robustness, whether an instance-optimal join algorithm exists for cyclic queries remains an open problem.

Debunking the Myth of Join Ordering: Toward Robust SQL Analytics  (2502.15181 - Zhao et al., 21 Feb 2025) in Section 1 (Introduction)