Tailwind:一个用于查询加速器的实用框架
Tailwind: A Practical Framework for Query Accelerators
AI总结:
Tailwind 提出一个外部查询规划器,允许在支持数据导入导出的 RDBMS 中使用查询加速器。通过抽象逻辑计划(ALPs)自动生成神经网络模型,动态选择加速器以提升查询性能。
摘要:
关系数据库管理系统(RDBMS)能够处理通用查询,但其性能通常低于为特定查询定制的解决方案。例如,考虑对少量已知组(如按国家分组)的分组查询。虽然 RDBMS 可能使用哈希表进行分组,但更快的方法是将预期组硬编码到查询执行器中。但此类工作负载特定技术(称为查询加速器)在实践中使用较少,因为工程努力(优化器和引擎更改、潜在的错误)无法证明孤立性能提升(单个特定查询的加速)。我们提出 Tailwind:一个外部查询规划器,使任何支持数据导入导出的 RDBMS 都能使用加速器。用户通过抽象逻辑计划(ALPs)定义加速器:一种基于常规树表达式的新的主要声明性抽象。ALPs 允许 Tailwind 自动构建定制的神经网络模型,以估计使用特定加速器的时机。在运行时,Tailwind 位于 RDBMS 之上,透明地重写查询以在一个或多个加速器上运行,当预测有益时,否则回退到底层 RDBMS。在 Redshift 和 DuckDB 上使用四个多样化的加速器库,Tailwind 平均将 TPC-H 查询加速 1.38 倍(最高 29 倍)
英文摘要:
Relational database management systems (RDBMSes) can process general-purpose queries, but often have lower performance compared to custom-built solutions for specific queries. For example, consider a group-by query over a few known groups (e.g., grouping by country). While an RDBMS would likely use a hash map to do the grouping, a faster method could hard-code the expected groups into the query executor. Such workload-specific techniques, which we call query accelerators, are not widely used in practice because the engineering effort (optimizer and engine changes, potential bugs) does not always justify the isolated performance gains (speedup on a specific query). We propose Tailwind: a non-invasive query planner that brings accelerators into any RDBMS that supports data import/export. Accelerator builders register accelerators using abstract logical plans (ALPs): a new abstraction based on regular tree expressions that specifies the logical sub-plans each accelerator can correctly replace. Tailwind also uses each ALP's structure to automatically build a neural network model to predict the accelerator's performance. At runtime, Tailwind sits atop an RDBMS and transparently rewrites queries to run across one or more accelerators when predicted to be beneficial, falling back to the underlying RDBMS when not. Across three distinct case studies, we use Tailwind to integrate workload-specific accelerators with Redshift and DuckDB to achieve geomean speedups of 1.38x, 1.76x, and 1.28x.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。