Taral <taral(at)taral(dot)net> writes:
> Do I need to code merge sort into postgresql?
Seems like a waste of effort to me. I find this example less than
compelling --- the case that could be sped up is quite narrow,
and the potential performance gain not all that large. (A sort
is a sort however you slice it, with O(N log N) runtime...)
Also, the direction we'd likely be going in in future is to merge
multiple indexscans using bitmap techniques, so that the output
ordering of the scans couldn't be counted on anyway.
regards, tom lane