A survey of adaptive sorting algorithms
ACM Computing Surveys (CSUR)
Fundamental techniques for order optimization
SIGMOD '96 Proceedings of the 1996 ACM SIGMOD international conference on Management of data
The art of computer programming, volume 3: (2nd ed.) sorting and searching
The art of computer programming, volume 3: (2nd ed.) sorting and searching
A survey of graph layout problems
ACM Computing Surveys (CSUR)
Access path selection in a relational database management system
SIGMOD '79 Proceedings of the 1979 ACM SIGMOD international conference on Management of data
Hash Joins and Hash Teams in Microsoft SQL Server
VLDB '98 Proceedings of the 24rd International Conference on Very Large Data Bases
The Volcano Optimizer Generator: Extensibility and Efficient Search
Proceedings of the Ninth International Conference on Data Engineering
Exploiting early sorting and early partitioning for decision support query processing
The VLDB Journal — The International Journal on Very Large Data Bases
External Sorting: Run Formation Revisited
IEEE Transactions on Knowledge and Data Engineering
An Efficient Framework for Order Optimization
ICDE '04 Proceedings of the 20th International Conference on Data Engineering
Implementing sorting in database systems
ACM Computing Surveys (CSUR)
Avoiding sorting and grouping in processing queries
VLDB '03 Proceedings of the 29th international conference on Very large data bases - Volume 29
A combined framework for grouping and order optimization
VLDB '04 Proceedings of the Thirtieth international conference on Very large data bases - Volume 30
The common prefix problem on trees
Information Processing Letters
Hi-index | 0.00 |
Sort orders play an important role in query evaluation. Algorithms that rely on sorting are widely used to implement joins, grouping, duplicate elimination and other set operations. The notion of interesting orders has allowed query optimizers to consider plans that could be locally sub-optimal, but produce ordered output beneficial for other operators, and thus be part of a globally optimal plan. However, the number of interesting orders for most operators is factorial in the number of attributes involved. Optimizer implementations use heuristics to prune the number of interesting orders, but the quality of the heuristics is unclear. Increasingly complex decision support queries and increasing use of query-covering indices, which provide multiple alternative sort orders for relations, motivate us to better address the problem of choosing interesting orders. We show that even a simplified version of the problem is NP-hard and provide a 1/2-benefit approximation algorithm for a special case of the problem. We then present principled heuristics for the general case of choosing interesting orders. We have implemented the proposed techniques in a Volcano-style cost-based optimizer, and our performance study shows significant improvements in estimated cost. We also executed our plans on a widely used commercial database system, and on PostgreSQL, and found that actual execution times for our plans were significantly better than for plans generated by those systems in several cases.