MongoDB Documentation, Release 3.0.4 How can I check the size of indexes for a collection? How can I get information on the storage use of a database? 11.8 FAQ: Indexes 11.8.1 Should you run createIndex() after every insert? 11.8.2 How do you know what indexes exist in a collection? 11.8.3 How do you determine the size of an index? 11.8.4 What happens if an index does not fit into RAM? To view the size of the data allocated for an index, use the db.collection.stats() method and check the indexSizes field in the returned document. The db.stats() method in the mongo shell returns the current state of the “active” database. For the description of the returned fields, see dbStats Output . This document addresses common questions regarding MongoDB indexes. If you don’t find the answer you’re looking for, check the complete list of FAQs (page 743) or post your question to the MongoDB User Mailing List$^{27}$. See also Indexing Tutorials (page 517). No. You only need to create an index once for a single collection. After initial creation, MongoDB automatically updates the index as data changes. While running createIndex() is usually ok, if an index doesn’t exist because of ongoing administrative work, a call to createIndex() may disrupt database availability. Running createIndex() can render a replica set inaccessible as the index creation is happening. See Build Indexes on Replica Sets (page 521). To list a collection’s indexes, use the db.collection.getIndexes() method or a similar method for your driver$^{28}$. To check the sizes of the indexes on a collection, use db.collection.stats() . When an index is too large to fit into RAM, MongoDB must read the index from disk, which is a much slower operation than reading from RAM. Keep in mind an index fits into RAM when your server has RAM available for the index combined with the rest of the working set . In certain cases, an index does not need to fit entirely into RAM. For details, see Indexes that Hold Only Recent Values in RAM (page 550). $^{27}$https://groups.google.com/forum/?fromgroups#!forum/mongodb-user $^{28}$https://api.mongodb.org/ 777 11.8. FAQ: Indexes