The goal of this project is to improve the sorting routine in PostgreSQL.
Currently, PostgreSQL is using QuickSort implemented by J. L. Bentley and M. D. McIlroy in "Engineering a sort function" with some modifications. This sorting routine is very fast, yet may fall to O(n^2) time complexity in the worst case scenario. A fast sorting algorithms with guaranteed O(nlogn) time complexity would be preferable.
This project compared several sorting algorithms and proposed a new sorting implementation.
- Using a more optimized sorting algorithm brings a performance gain for many parts of PostgreSQL.
- The benchmark could be used for further improvement of the sorting routine.
- New hash table implementation