Over the last decade, worst-case optimal join (WCOJ) algorithms have emerged as a new paradigm for one of the most fundamental challenges in query processing: computing joins efficiently. Such an algorithm can be asymptotically faster than traditional binary joins, all the while remaining simple to understand and implement. However, they have been found to be less efficient than the old paradigm, traditional binary join plans, on the typical acyclic queries found in practice. Some database systems that support WCOJ use a hypbrid approach: use WCOJ to process the cyclic subparts of the query (if any), and rely on traditional binary joins otherwise. In this paper we propose a new framework, called Free Join, that unifies the two paradigms. We describe a new type of plan, a new data structure (which unifies the hash tables and tries used by the two paradigms), and a suite of optimization techniques. Our system, implemented in Rust, matches or outperforms both traditional binary joins and Generic Join on standard query benchmarks.
翻译:在过去十年中,最坏情况最优连接(WCOJ)算法已成为查询处理中最基本挑战之一——高效计算连接——的新范式。这类算法在渐近性能上可比传统二元连接更快,同时保持易于理解和实现。然而,在实际中常见的无环查询上,人们发现其效率低于传统范式,即传统二元连接计划。一些支持WCOJ的数据库系统采用混合方法:使用WCOJ处理查询中的循环子部分(如有),否则依赖传统二元连接。本文提出一种名为Free Join的新框架,统一了这两种范式。我们描述了一种新型计划、一种新数据结构(统一了两种范式使用的哈希表和字典树),以及一系列优化技术。我们的系统采用Rust实现,在标准查询基准测试中性能匹配或超越了传统二元连接和通用连接。