Factor Windows: Cost-based Query Rewriting for Optimizing Correlated Window Aggregates
Wentao Wu, Philip A. Bernstein, Alex Raizman, Christina Pavlopoulou

TL;DR
This paper introduces a cost-based query rewriting framework using factor windows to optimize correlated window aggregates in stream processing, significantly improving throughput without altering the underlying system.
Contribution
It proposes a novel cost-based optimization method utilizing auxiliary factor windows for shared computation in stream queries.
Findings
Rewritten plans can achieve up to 16.8x higher throughput.
Optimization is applicable to any SQL-like stream processing system.
Formalization of shared computation problem and detailed optimization techniques.
Abstract
Window aggregates are ubiquitous in stream processing. In Azure Stream Analytics (ASA), a stream processing service hosted by Microsoft's Azure cloud, we see many customer queries that contain aggregate functions (such as MIN and MAX) over multiple correlated windows (e.g., tumbling windows of length five minutes and ten minutes) defined on the same event stream. In this paper, we present a cost-based optimization framework for optimizing such queries by sharing computation among multiple windows. In particular, we introduce the notion of factor windows, which are auxiliary windows that are not in the input query but may nevertheless help reduce the overall computation cost, and our cost-based optimizer can produce rewritten query plans that have lower costs than the original query plan by utilizing factor windows. Since our optimization techniques are at the level of query (plan)…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Database Systems and Queries · Data Management and Algorithms · Data Stream Mining Techniques
