用混合线性规划求解连接排序问题
Solving the Join Ordering Problem via Mixed Integer Linear Programming
摘要:
我们将连接排序转化为一个混合整数线性规划(MILP)。这允许通过成熟的MILP求解器实现来解决查询优化,这些MILP求解器实现已经发展了几十年并稳步提高了它们的性能。它们提供了与查询优化高度相关的随时优化和并行搜索等特性。我们提出了一个MILP制定搜索左深查询计划。我们使用二进制变量集来表示连接操作数和中间结果,操作符实现选择或有趣的顺序的存在。线性约束将值分配限制为表示有效查询计划的值。我们通过线性函数近似扫描和连接操作的成本,允许将近似精度提高到任意程度。我们的实验结果是令人鼓舞的:我们能够找到最佳的计划之间的连接60个表,查询的大小,是超出了以前的详尽的查询优化方法的能力。
英文摘要:
We transform join ordering into a mixed integer linear program (MILP). This allows to address query optimization by mature MILP solver implementations that have evolved over decades and steadily improved their performance. They offer features such as anytime optimization and parallel search that are highly relevant for query optimization. We present a MILP formulation for searching left-deep query plans. We use sets of binary variables to represent join operands and intermediate results, operator implementation choices or the presence of interesting orders. Linear constraints restrict value assignments to the ones representing valid query plans. We approximate the cost of scan and join operations via linear functions, allowing to increase approximation precision up to arbitrary degrees. Our experimental results are encouraging: we are able to find optimal plans for joins between 60 tables; a query size that is beyond the capabilities of prior exhaustive query optimization methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。