Re: BUG #17162: order by clause is not pushed down to foreign scans when a WHERE clause is given in query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: chetansuttraway(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17162: order by clause is not pushed down to foreign scans when a WHERE clause is given in query
Date: 2021-08-26 14:11:22
Message-ID: 649001.1629987082@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Wouldn't it be good to push order by clause even when where clause is given
> in query?

Maybe, but you haven't demonstrated it. In the example you show,
the query plan still requires a local sort, so pre-sorting the
individual inputs to that would just add cycles without accomplishing
anything.

In any case, this is not a bug.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Chetan 2021-08-26 14:54:07 Re: BUG #17162: order by clause is not pushed down to foreign scans when a WHERE clause is given in query
Previous Message Tom Lane 2021-08-26 14:07:12 Re: Is Backgroundworker.bgw_restart_time is defined in seconds?