I have investigate the actual mongo command that issued from mongo_fdw when using SELECT _id FROM warehouse
by setting following in mongodb, we can examine actual commands from mongo side
db.setProfilingLevel(2)
db.collection("system.profile").sort({"ts": -1})
even if only SELECT _id FROM warehouse, it issue the commands seems return entire document without $project in aggregation pipeline,
"command" : {
"aggregate" : "warehouse",
"pipeline" : [
{
"$match" : {}
}
],
"cursor" : {},
"$db" : "db",
"lsid" : {
"id" : UUID("0c5b5caf-229b-4db3-b66a-04305ac9c4e5")
}
},
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 use meta driver and mongoc is 1.17.3
I have investigate the actual mongo command that issued from
mongo_fdwwhen usingSELECT _id FROM warehouseby 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$projectin aggregation pipeline,I think it cost much IO (network/disk) time to transfer unwanted data that postgresssql side doen't ask.
Could
mongo_fdwneeds support that in the near future ?or correct me If I forgot to configure something to use
$project, I usemeta driverand mongoc is1.17.3