Re: Getting sorted data from foreign server - Mailing list pgsql-hackers

From Jeremy Harris
Subject Re: Getting sorted data from foreign server
Date
Msg-id 5616BE27.3000103@wizmail.org
Whole thread Raw
In response to Re: Getting sorted data from foreign server  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Getting sorted data from foreign server  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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.
-- 
Jeremy




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: PL/Pythonu - function ereport
Next
From: Robert Haas
Date:
Subject: Re: Getting sorted data from foreign server