arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1608.05678cs.DB
收藏

再谈内存数据库系统中的重用

Revisiting Reuse in Main Memory Database Systems

Kayhan Dursun, Carsten Binnig, Ugur Cetintemel, Tim Kraska

摘要:

重用数据库中的中间体来加速分析查询处理已经在过去进行了研究。现有的解决方案通常需要将各个运算符的中间结果具体化为临时表,以便在后续查询中重用。然而,这些方法基本上不适合在现代主存数据库中使用。原因是现代主存DBMS通常受到内存总线带宽的限制,因此查询执行被大量优化以将元组保持在CPU缓存和寄存器中。为此,将额外的物化操作添加到查询计划中不仅会向内存总线添加额外的流量,而且更重要的是会阻止重要的缓存和寄存器局部性机会,从而导致高性能损失。在本文中,我们研究了一种新的重用模型的中间,缓存内部物理数据结构物化查询处理(由于管道断路器)和外部化,使他们成为可重用的即将到来的操作。我们重点讨论哈希表,这是主存数据库中最常用的内部数据结构,用于执行连接和聚合操作。当查询到达时,我们的重用感知优化器会对哈希表的重用机会进行推理,并采用成本模型,该模型将哈希表统计信息以及缓存层次结构中的CPU和数据移动成本考虑在内。基于我们的HashStash原型的实验结果证明了$2\times$在典型分析工作负载中的性能提升,并且没有额外的开销用于实现中间体。

英文摘要:

Reusing intermediates in databases to speed-up analytical query processing has been studied in the past. Existing solutions typically require intermediate results of individual operators to be materialized into temporary tables to be considered for reuse in subsequent queries. However, these approaches are fundamentally ill-suited for use in modern main memory databases. The reason is that modern main memory DBMSs are typically limited by the bandwidth of the memory bus, thus query execution is heavily optimized to keep tuples in the CPU caches and registers. To that end, adding additional materialization operations into a query plan not only add additional traffic to the memory bus but more importantly prevent the important cache- and register-locality opportunities resulting in high performance penalties. In this paper we study a novel reuse model for intermediates, which caches internal physical data structures materialized during query processing (due to pipeline breakers) and externalizes them so that they become reusable for upcoming operations. We focus on hash tables, the most commonly used internal data structure in main memory databases to perform join and aggregation operations. As queries arrive, our reuse-aware optimizer reasons about the reuse opportunities for hash tables, employing cost models that take into account hash table statistics together with the CPU and data movement costs within the cache hierarchy. Experimental results, based on our HashStash prototype demonstrate performance gains of $2\times$ for typical analytical workloads with no additional overhead for materializing intermediates.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑