This paper explores a new opportunity to improve the performance of transaction processing at the application side by merging structurely similar statements or transactions. Concretely, we re-write transactions to 1) merge similar statements using specific SQL semantics; 2) eliminate redundant reads; and 3) merge contending statements across transactions by pre-computing their aggregated effect. Following this idea, we present the design of TransactionMerger, a middleware to collect and merge transactions across different clients. We further present a static analysis tool to identify the merging opportunity without violating isolation as well as our experience of re-writing transactions in TPC-C and Spree, a popular real-world application. Our evaluation shows that such transaction merging can improve TPC-C throughput by up to 2.65X and Spree throughput by 3.52X.
翻译:本文探讨了一种在应用端通过合并结构相似的语句或事务来提升事务处理性能的新方法。具体而言,我们重写事务以实现以下目标:1) 利用特定的SQL语义合并相似语句;2) 消除冗余读取操作;3) 通过预先计算其聚合效应,合并跨事务的竞争性语句。基于这一思路,我们提出了TransactionMerger的设计,这是一个用于收集并合并来自不同客户端事务的中间件。我们进一步介绍了一种静态分析工具,用于在不违反隔离性的前提下识别合并机会,并分享了我们在TPC-C和实际流行应用Spree中重写事务的经验。评估结果表明,此类事务合并技术可将TPC-C的吞吐量最高提升2.65倍,将Spree的吞吐量提升3.52倍。