![]() Internally, MongoDB uses the B-tree structure to store the index. In other words, an index improves the speed of document retrieval at the cost of additional write and storage space to maintain the index data structure. However, when you insert, update, or delete the documents from the collection, MongoDB needs to update the index accordingly. To speed up a query, you can create an index for a field of a collection. The MongoDB index works in a similar way. ![]() In this analogy, the index speeds up the search and makes it more efficient. ![]() Therefore, you can open page 201 to get detailed information about the movie: In this example, the movie with the title Pirates of Silicon Valley is located on page 201.
0 Comments
Leave a Reply. |