Does MongoDB skip index updates if a field is set to its current value?

Hi, yes MongoDB detects when values have not changed and skips the write entirely when the document is the same. However, if you update another unindexed field with a new value, it will write the document because that part has changed, but it will still skip the write to the index where the value remained unchanged.

1 Like