{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/beyond-equi-joins-ranking-enumeration-and","title":"Beyond Equi-joins: Ranking, Enumeration and Factorization","arxiv_id":"2101.12158","date":"2021-01-28","proceeding":null,"authors":["Nikolaos Tziavelis","Wolfgang Gatterbauer","Mirek Riedewald"],"abstract":"We study theta-joins in general and join predicates with conjunctions and disjunctions of inequalities in particular, focusing on ranked enumeration where the answers are returned incrementally in an order dictated by a given ranking function. Our approach achieves strong time and space complexity properties: with $n$ denoting the number of tuples in the database, we guarantee for acyclic full join queries with inequality conditions that for every value of $k$, the $k$ top-ranked answers are returned in $\\mathcal{O}(n \\operatorname{polylog} n + k \\log k)$ time. This is within a polylogarithmic factor of $\\mathcal{O}(n + k \\log k)$, i.e., the best known complexity for equi-joins, and even of $\\mathcal{O}(n+k)$, i.e., the time it takes to look at the input and return $k$ answers in any order. Our guarantees extend to join queries with selections and many types of projections (namely those called \"free-connex\" queries and those that use bag semantics). Remarkably, they hold even when the number of join results is $n^\\ell$ for a join of $\\ell$ relations. The key ingredient is a novel $\\mathcal{O}(n \\operatorname{polylog} n)$-size factorized representation of the query output, which is constructed on-the-fly for a given query and database. In addition to providing the first non-trivial theoretical guarantees beyond equi-joins, we show in an experimental study that our ranked-enumeration approach is also memory-efficient and fast in practice, beating the running time of state-of-the-art database systems by orders of magnitude.","url_abs":"https://arxiv.org/abs/2101.12158v4","url_pdf":"https://arxiv.org/pdf/2101.12158v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"beyond-equi-joins-ranking-enumeration-and","repo_url":"https://github.com/northeastern-datalab/anyk-code","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}