New query optimization techniques in the Spark engine of Azure synapse

Author:

Modi Abhishek1,Rajan Kaushik2,Thimmaiah Srinivas1,Jain Prakhar3,Mann Swinky1,Agarwal Ayushi1,Shetty Ajith1,I Shahid K1,Gosalia Ashit4,Sarthi Partho5

Affiliation:

1. Microsoft, India

2. Microsoft Research, India

3. Databricks

4. Microsoft

5. University of Wisconsin-Madison

Abstract

The cost of big-data query execution is dominated by stateful operators. These include sort and hash-aggregate that typically materialize intermediate data in memory, and exchange that materializes data to disk and transfers data over the network. In this paper we focus on several query optimization techniques that reduce the cost of these operators. First, we introduce a novel exchange placement algorithm that improves the state-of-the-art and significantly reduces the amount of data exchanged. The algorithm simultaneously minimizes the number of exchanges required and maximizes computation reuse via multi-consumer exchanges. Second, we introduce three partial push-down optimizations that push down partial computation derived from existing operators ( group-bys , intersections and joins ) below these stateful operators. While these optimizations are generically applicable we find that two of these optimizations ( partial aggregate and partial semi-join push-down ) are only beneficial in the scale-out setting where exchanges are a bottleneck. We propose novel extensions to existing literature to perform more aggressive partial push-downs than the state-of-the-art and also specialize them to the big-data setting. Finally we propose peephole optimizations that specialize the implementation of stateful operators to their input parameters. All our optimizations are implemented in the spark engine that powers azure synapse. We evaluate their impact on TPCDS and demonstrate that they make our engine 1.8X faster than Apache Spark 3.0.1.

Publisher

Association for Computing Machinery (ACM)

Subject

General Earth and Planetary Sciences,Water Science and Technology,Geography, Planning and Development

Reference35 articles.

1. Spark SQL Aggregate Rewrite Rule. https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/AggUtils.scala. Spark SQL Aggregate Rewrite Rule. https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/AggUtils.scala.

2. Spark SQL Expand Operator. https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala. Spark SQL Expand Operator. https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala.

3. Spark SQL HashAggregate Operator. https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala. Spark SQL HashAggregate Operator. https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala.

4. Spark SQL Set Operators. https://spark.apache.org/docs/latest/sql-ref-syntax-qry-select-setops.html. Spark SQL Set Operators. https://spark.apache.org/docs/latest/sql-ref-syntax-qry-select-setops.html.

5. Apache Spark the Fastest Open Source Engine for Sorting a Petabyte . https://databricks.com/blog/2014/10/10/spark-petabyte-sort.html , 2014 . Apache Spark the Fastest Open Source Engine for Sorting a Petabyte. https://databricks.com/blog/2014/10/10/spark-petabyte-sort.html, 2014.

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Anser: Adaptive Information Sharing Framework of AnalyticDB;Proceedings of the VLDB Endowment;2023-08

2. Predicate Pushdown for Data Science Pipelines;Proceedings of the ACM on Management of Data;2023-06-13

3. Optimization of the Join between Large Tables in the Spark Distributed Framework;Applied Sciences;2023-05-19

4. Accelerating Cloud-Native Databases with Distributed PMem Stores;2023 IEEE 39th International Conference on Data Engineering (ICDE);2023-04

5. Toward Building Edge Learning Pipelines;IEEE Internet Computing;2023-01-01

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3