mosql icon indicating copy to clipboard operation
mosql copied to clipboard

Optimisation with update operations

Open tomsoft1 opened this issue 12 years ago • 1 comments

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?

tomsoft1 avatar Sep 06 '13 16:09 tomsoft1

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.

nelhage avatar Sep 06 '13 21:09 nelhage