Mongodb $3.4 Write Operation Performance
Mongodb $3.4 Optimize Query Performance
Each index on a collection adds some amount of overhead to the performance of write operations.
For each insert or delete write operation on a collection, MongoDB either inserts or removes the corresponding document keys from each index in the target collection. An update operation may result in updates to a subset of indexes on the collection, depending on the keys affected by the update.
1.建立索引后的查询效率大大提升,但是索引查询的数量如果超过50%,意味着遍历更有优势。
2.索引增加会影响insert和update性能。




网友评论