From: | Pete Storer <Pete(dot)Storer(at)sas(dot)com> |
---|---|
To: | Christophe Pettus <xof(at)thebuild(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joe Conway <mail(at)joeconway(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Query execution failure |
Date: | 2023-01-30 18:24:12 |
Message-ID: | SN6PR05MB6637045A3875380FFE2399D3F3D39@SN6PR05MB6637.namprd05.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Makes sense - but I'm using the PG substring function here.
LEFT OUTER JOIN main.ship_event se ON (se.ship_event_nm = substring(dp.shipevent from 6 for 5))
In this case, the dp.shipevent is in the fdw-accessed MySql table. Shouldn't that force the sort to be local?
-----Original Message-----
From: Christophe Pettus <xof(at)thebuild(dot)com>
Sent: Monday, January 30, 2023 1:20 PM
To: Pete Storer <Pete(dot)Storer(at)sas(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>; Joe Conway <mail(at)joeconway(dot)com>; Bruce Momjian <bruce(at)momjian(dot)us>; pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Query execution failure
[You don't often get email from xof(at)thebuild(dot)com(dot) Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
EXTERNAL
> On Jan 30, 2023, at 10:17, Pete Storer <Pete(dot)Storer(at)sas(dot)com> wrote:
>
> This is very interesting, guys. And it leads me to a question: Is there any way to FORCE Postgres to do a local sort/collation of any data that is accessed through a FDW?
It depends on the FDW. One thing to try is to have the SORT be an expression, especially one that depends on functions that can't otherwise be pushed down. (You may have to do some experimenting to find one that returns identity, i.e. the same sort order as just the bare column, but isn't pushed down.)
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2023-01-30 20:04:58 | Re: Query execution failure |
Previous Message | Christophe Pettus | 2023-01-30 18:20:05 | Re: Query execution failure |