
256
Rethink ery Optimization in HTAP Databases
HAOZE SONG
∗
, The University of Hong Kong, Hong Kong SAR
WENCHAO ZHOU, Alibaba Group, China
FEIFEI LI, Alibaba Group, China
XIANG PENG, Alibaba Group, China
HEMING CUI, The University of Hong Kong, Hong Kong SAR
The advent of data-intensive applications has fueled the evolution of hybrid transactional and analytical
processing (HTAP). To support mixed workloads, distributed HTAP databases typically maintain two data
copies that are specially tailored for data freshness and performance isolation. In particular, a copy in a
row-oriented format is well-suited for OLTP workloads, and a second copy in a column-oriented format is
optimized for OLAP workloads. Such a hybrid design opens up a new design space for query optimization:
plans can be optimized over dierent data formats and can be executed over isolated resources, which we
term hybrid plans. In this paper, we demonstrate that hybrid plans can largely benet query execution (e.g.,
up to 11
×
speedups in our evaluation). However, we also found these benets will be potentially at the cost
of sacricing data freshness or performance isolation since traditional optimizers may not precisely model
and schedule the execution of hybrid plans on real-time updated HTAP databases. Therefore, we propose
Metis, an HTAP-aware optimizer. We show, both theoretically and experimentally, that using the proposed
optimizations, a system can largely benet from hybrid plans while preserving isolated performance for OLTP
and OLAP, and these optimizations are robust to the changes in workloads.
CCS Concepts: • Information systems
→
Data access methods; Query optimization; Data layout; •
Computer systems organization → Real-time system architecture.
Additional Key Words and Phrases: Hybrid Transactional and Analytical Processing (HTAP) Databases,
Adaptive Query Plan, Mixed Workloads
ACM Reference Format:
Haoze Song, Wenchao Zhou, Feifei Li, Xiang Peng, and Heming Cui. 2023. Rethink Query Optimization
in HTAP Databases. Proc. ACM Manag. Data 1, 4 (SIGMOD), Article 256 (December 2023), 27 pages. https:
//doi.org/10.1145/3626750
1 INTRODUCTION
Today, data-intensive applications often utilize vast amounts of data for diverse real-time business
tasks (e.g., data-driven decisions [
4
,
13
,
17
,
26
]), necessitating weaving analytical and transactional
processing techniques together [
45
]. In response, many recent academic and industrial eorts have
been devoted to developing hybrid transactional and analytical processing (HTAP) systems [
2
,
16
,
31
,
33
,
35
,
41
–
43
,
49
,
51
,
55
–
57
,
61
,
62
,
68
], which are expected to provide
1
prompt analysis of
∗
Work performed during an internship at Alibaba Group.
Authors’ addresses: Haoze Song, hzsong@cs.hku.hk, The University of Hong Kong, Pok Fu Lam, Hong Kong SAR; Wenchao
Zhou, zwc231487@alibaba-inc.com, Alibaba Group, 969 West Wen Yi Road, Yu Hang District, Hangzhou, Zhejiang, China;
Feifei Li, lifeifei@alibaba-inc.com, Alibaba Group, 969 West Wen Yi Road, Yu Hang District, Hangzhou, Zhejiang, China;
Xiang Peng, pengxiang.px@alibaba-inc.com, Alibaba Group, 969 West Wen Yi Road, Yu Hang District, Hangzhou, Zhejiang,
China; Heming Cui, heming@cs.hku.hk, The University of Hong Kong, Pok Fu Lam, Hong Kong SAR.
This work is licensed under a Creative Commons Attribution-NonCommercial International 4.0
License.
© 2023 Copyright held by the owner/author(s).
2836-6573/2023/12-ART256
https://doi.org/10.1145/3626750
Proc. ACM Manag. Data, Vol. 1, No. 4 (SIGMOD), Article 256. Publication date: December 2023.
Downloaded from the ACM Digital Library on April 8, 2025.
相关文档
评论