talis/tripod-php

Selective in-place updates of CBDs

scaleupcto opened this issue · 1 comments

When we update a CBD, we replace the whole document in mongo, even if only a small quantity of the fields have been changed or added.

This causes very slow updates on CBDs of even moderate size, as the database may need to reallocate space or re-write indexes even if indexed fields have not been updated.

Instead, use in-place updates, using $set and $unset to improve the performance of updates.

👍

On Wednesday, November 19, 2014, Chris Clarke notifications@github.com
wrote:

When we update a CBD, we replace the whole document in mongo, even if
only a small quantity of the fields have been changed or added.

This causes very slow updates on CBDs of even moderate size, as the
database may need to reallocate space or re-write indexes even if indexed
fields have not been updated.

Instead, use in-place updates, using $set and $unset to improve the
performance of updates.


Reply to this email directly or view it on GitHub
#32.