Generating Application-specific Data Layouts for In-memory Databases

Generating Application-specific Data Layouts for In-memory Databases
复制标题

DOI:
10.14778/3342263.3342630
复制
发表时间:
2019-07
期刊:
Proc. VLDB Endow.
影响因子:
--
通讯作者:
Cong Yan;Alvin Cheung
Cong Yan;Alvin Cheung
中科院分区:
其他
文献类型:
--
作者:
Cong Yan;Alvin Cheung

文献摘要

相似文献

数据库应用程序通常使用面向对象语言开发,同时使用关系数据库作为后端。为了加速这些应用程序,开发人员将手动设计定制的数据结构以将数据存储在内存中,以及利用这种数据结构来回答查询的方法。这样做是脆弱的,需要大量的努力。或者,开发人员可以使用关系物理设计工具来创建物化视图和索引,从而自动化该过程。然而,面向对象的数据库应用程序的特点往往是从传统的数据库应用程序,使经典的关系查询优化技术往往不能加快查询,从这样的应用程序,我们的实验表明。为了解决这个问题,我们构建了Chestnut,这是一个用于内存中面向对象数据库应用程序的数据布局生成器。给定内存预算,Chestnut生成定制的内存中数据布局和查询计划,以回答使用Rails API(用于构建面向对象数据库应用程序的公共框架)的子集编写的查询。Chestnut与传统的查询优化器和物理设计器有两个不同之处。首先,Chestnut在分析应用程序的查询后自动生成为应用程序定制的数据布局,因此Chestnut生成的数据布局旨在有效地回答来自此类应用程序的查询。其次,Chestnut使用一种新的基于枚举和验证的算法来生成使用这种数据布局的查询计划,而不是像传统查询优化器那样使用基于规则的方法。我们在四个开源Rails数据库应用程序上评估了Chestnut。结果表明,与其他内存关系数据库引擎相比,它可以将平均查询处理时间减少3.6倍以上(最多42倍)。
Database applications are often developed with object-oriented languages while using relational databases as the backend. To accelerate these applications, developers would manually design customized data structures to store data in memory, and ways to utilize such data structures to answer queries. Doing so is brittle and requires a lot of effort. Alternatively, developers might automate the process by using relational physical design tools to create materialized views and indexes instead. However, the characteristics of object-oriented database applications are often distinct enough from traditional database applications such that classical relational query optimization techniques often cannot speed up queries that arise from such applications, as our experiments show. To address this, we build Chestnut, a data layout generator for in-memory object-oriented database applications. Given a memory budget, Chestnut generates customized in-memory data layouts and query plans to answer queries written using a subset of the Rails API, a common framework for building object-oriented database applications. Chestnut differs from traditional query optimizers and physical designers in two ways. First, Chestnut automatically generates data layouts that are customized for the application after analyzing their queries, hence Chestnut-generated data layouts are designed to be efficient to answer queries from such applications. second, Chestnut uses a novel enumeration and verification-based algorithm to generate query plans that use such data layouts, rather than rule-based approaches as in traditional query optimizers. We evaluated Chestnut on four open-source Rails database applications. The result shows that it can reduce average query processing time by over 3.6X (and up to 42X), as compared to other in-memory relational database engines.