On 08/10/15 17:09, Robert Haas wrote:
> - You consider pushing down ORDER BY if any prefix of the query
> pathkeys satisfy is_foreign_expr(), but that doesn't seem right to me.
> If the user says SELECT * FROM remotetab ORDER BY a, unsafe(a),
> ordering the result set by a doesn't help us much. We've talked a few
> times about an incremental sort capability that would take a stream of
> tuples already ordered by one or more columns and sort each group by
> additional columns, but I don't think we have that currently. Without
> that capability, I don't think there's much benefit in sorting by a
> prefix of the pathkeys. I suspect that if we can't get them all, it's
> not worth doing.
That depends how often the additional columns affect the sorted
order, if the sort method takes advantage of sorted input.
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: