Ray's playground

 

Indexing(Chapter 5 of MongoDB The Definitive Guild)

  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.

posted on 2010-10-12 20:28  Ray Z  阅读(163)  评论(0编辑  收藏  举报

导航