Open zhang699 opened 2 years ago
Hi @zhang699
correct me If I forgot to configure something to use $project, I use meta driver and mongoc is 1.17.3
Your observation is correct. Currently, there is NO way to use $project.
The mongo_fdw don't support column push down. The reason behind this is mentioned in one of the comments in the code i.e. column push down resulting in performance degradation. The comment says,
`
/*
I think it cost much IO (network/disk) time to transfer unwanted data that postgresssql side doen't ask. Could mongo_fdw needs support that in the near future ?
We have to do more study around this to come to the conclusion. We have added this to the TO-DO list. We will work on this in near future.
Thanks !!
I have investigate the actual mongo command that issued from
mongo_fdw
when usingSELECT _id FROM warehouse
by setting following in mongodb, we can examine actual commands from mongo side
even if only
SELECT _id FROM warehouse
, it issue the commands seems return entire document without$project
in aggregation pipeline,I think it cost much IO (network/disk) time to transfer unwanted data that postgresssql side doen't ask. Could
mongo_fdw
needs support that in the near future ?or correct me If I forgot to configure something to use
$project
, I usemeta driver
and mongoc is1.17.3