In this chapter, we will learn about Indexing Limitations and its other components.
Every index occupies some space as well as causes an overhead on each insert, update and delete. So if you rarely use your collection for read operations, it makes sense not to use indexes.
Since indexes are stored in RAM, you should make sure that the total size of the index does not exceed the RAM limit. If the total size increases the RAM size, it will start deleting some indexes, causing performance loss.
Indexing can't be used in queries which use −
Hence, it is always advisable to check the index usage for your queries.
Starting from version 2.6, MongoDB will not create an index if the value of existing index field exceeds the index key limit.
MongoDB will not insert any document into an indexed collection if the indexed field value of this document exceeds the index key limit. Same is the case with mongorestore and mongoimport utilities.