课程: Advanced MongoDB: Efficient and Secure Data Management
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
Clustered collections - MongoDB教程
课程: Advanced MongoDB: Efficient and Secure Data Management
Clustered collections
- [Instructor] A clustered collection is a collection that stores data in the order specified by the configured clustered index. There are a few key differences between collections and clustered collections. The data in clustered collections is stored in a specific order, whereas data in normal collections is not stored in an order that you can specify. This makes ordered data retrieval faster on clustered collections, as long as the order in which you are retrieving the data is the same as the way it is stored because then data can be read from the same place on disk. With regular collections, an index needs to be consulted to find the location of each piece of data when you're trying to retrieve data in a specific order. Reading data that is fragmented across a disk takes longer than when it is stored in the order it is accessed in. A third difference is that a clustered collection stores the index and the documents…