Loading…
New query optimization techniques in the Spark engine of Azure synapse
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...
Saved in:
Published in: | Proceedings of the VLDB Endowment 2021-12, Vol.15 (4), p.936-948 |
---|---|
Main Authors: | , , , , , , , , , |
Format: | Article |
Language: | English |
Citations: | Items that this one cites Items that cite this one |
Online Access: | Get full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Summary: | 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. |
---|---|
ISSN: | 2150-8097 2150-8097 |
DOI: | 10.14778/3503585.3503601 |