Indexing(Chapter 5 of MongoDB The Definitive Guild)
时间:2010-10-12 来源:Ray Z
explain is an incredibly handy tool that will give you lots of information about your queries. You can run it on any query by tacking it on to a cursor. explain returns a document, not the cursor itself, unlike most cursor methods:
> db.foo.find().explain()
explain will return information about the indexes used for the query (if any) and stats about timing and the number of documents scanned.
相关阅读 更多 +