Optimization of Analytic Window Functions
Abstract
Analytic functions represent the state-of-the-art way of performing complex data analysis within a single SQL statement. In particular, an important class of analytic functions that has been frequently used in commercial systems to support OLAP and decision support applications is the class of window functions. A window function returns for each input tuple a value derived from applying a function over a window of neighboring tuples. However, existing window function evaluation approaches are based on a naive sorting scheme. In this paper, we study the problem of optimizing the evaluation of window functions. We propose several efficient techniques, and identify optimization opportunities that allow us to optimize the evaluation of a set of window functions. We have integrated our scheme into PostgreSQL. Our comprehensive experimental study on the TPC-DS datasets as well as synthetic datasets and queries demonstrate significant speedup over existing approaches.
- Publication:
-
arXiv e-prints
- Pub Date:
- July 2012
- DOI:
- 10.48550/arXiv.1208.0086
- arXiv:
- arXiv:1208.0086
- Bibcode:
- 2012arXiv1208.0086C
- Keywords:
-
- Computer Science - Databases
- E-Print:
- VLDB2012