Sort-sharing-aware query processing

被引:0
作者
Yu Cao
Ramadhana Bramandia
Chee-Yong Chan
Kian-Lee Tan
机构
[1] National University of Singapore,Department of Computer Science, School of Computing
来源
The VLDB Journal | 2012年 / 21卷
关键词
Query processing; Sort operation; Sort sharing; Cooperative sorting;
D O I
暂无
中图分类号
学科分类号
摘要
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.
引用
收藏
页码:411 / 436
页数:25
相关论文
共 17 条
  • [1] Dinsmore R.(1965)Longer strings for sorting Commun. ACM 8 48-476
  • [2] Estivill-Castro V.(1992)A survey of adaptive sorting algorithms ACM Comput. Surv. (CSUR) 24 441-913
  • [3] Wood D.(1972)Sorting by natural selection Commun. ACM 15 910-437
  • [4] Frazer W.(2003)Arborescence optimization problems solvable by edmonds’ algorithm Theor. Comput. Sci. 301 427-1425
  • [5] Wong C.(2006)Implementing sorting in database systems ACM Comput. Surv. 38 10-972
  • [6] Georgiadis L.(2006)Fasterdsp: a faster approximation algorithm for directed steiner tree problem J. Inf. Sci. Eng. 22 1409-290
  • [7] Graefe G.(2003)External sorting: Run formation revisited IEEE Trans. Knowl. Data Eng. 15 961-215
  • [8] Hsieh M.-I.(1982)View indexing in relational databases ACM Trans. Database Syst. 7 258-301
  • [9] Wu E.H.-K.(1989)Merging sorted runs using large main memory Acta Informatica 27 195-332
  • [10] Tsai M.-F.(1977)Multiway replacement selection sort with dynamic reservoir Comput. J. 20 298-undefined