Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
700 stars 145 forks source link

Push JOINs to the fdw level #270

Closed seacom closed 2 years ago

seacom commented 3 years ago

Hi,

from some test with multicorn 1.4.0 and postgresql 13 I'm seeing that JOIN queries are not push down to the foreign sqlalchemy database, instead a SELECT query for every joined table is pushed down and the joining is computed in postgresql.

Is that correct? Is pushing down the JOIN queries something that will be implemented in multicorn in the future?

I think that pushing down that kind of query can reduce both the postgresql load and the network usage between multicorn and the foreign datasource.

luss commented 2 years ago

Please ask this question on https://github.com/pgsql-io/multicorn. In my experience, when pushing down queries in an FDW, you need to convert the pushdown parms to the syntax of the underlying data engine. Offhand, I'm not sure how this could be generalized for Multicorn.

seacom commented 2 years ago

Thank you for your informations!