Sorts for data sets that exceed work_mem now use a batch sorting algorithm that uses more output streams and improves performance.
work_mem