mosql
mosql copied to clipboard
Optimisation with update operations
Update ops seems to take a looong time, especially if there is no impact on the postgres
Why not check in case of set/unset field if this field is part of the postgres schema? If not, don't do the update except if there is the extra field with the json struct?
That's a reasonable optimization. It's also vaguely on my list to try to optimize $set ops to not need to read the original record in from Mongo, and just translate the the op directly to SQL..
We tend to use postgres schemas that map most of the columns from mongo, so the optimization of skipping some ops wouldn't be a huge win in our environment, but I'd happily look at a patch if someone else was interested.