Sort-sharing-aware query processing

  • Authors:
  • Yu Cao;Ramadhana Bramandia;Chee-Yong Chan;Kian-Lee Tan

  • Affiliations:
  • Department of Computer Science, School of Computing, National University of Singapore, Singapore, Singapore;Department of Computer Science, School of Computing, National University of Singapore, Singapore, Singapore;Department of Computer Science, School of Computing, National University of Singapore, Singapore, Singapore;Department of Computer Science, School of Computing, National University of Singapore, Singapore, Singapore

  • Venue:
  • The VLDB Journal — The International Journal on Very Large Data Bases
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many database applications require sorting a table (or relation) over multiple sort orders. Some examples include creation of multiple indices on a relation, generation of multiple reports from a table, evaluation of a complex query that involves multiple instances of a relation, and batch processing of a set of queries. In this paper, we study how to optimize multiple sortings of a table. We investigate the correlation between sort orders and exploit sort-sharing techniques of reusing the (partial) work done to sort a table on a particular order for another order. Specifically, we introduce a novel and powerful evaluation technique, called cooperative sorting, that enables sort sharing between seemingly non-related sort orders. Subsequently, given a specific set of sort orders, we determine the best combination of various sort-sharing techniques so as to minimize the total processing cost. We also develop techniques to make a traditional query optimizer extensible so that it will not miss the truly cheapest execution plan with the sort-sharing (post-) optimization turned on. We demonstrate the efficiency of our ideas with a prototype implementation in PostgreSQL and evaluate the performance using both TPC-DS benchmark and synthetic data. Our experimental results show significant performance improvement over the traditional evaluation scheme.