MongoDB实战(第二版)

最新书摘:
  • 不理不理左卫门
    2017-01-24
    维基百科中解释为“射后不理”,源自军事领域,泛指武器发射后无需外界干涉就能自己更新目标或者自己坐标的能力。
  • 麥町呲溜变向
    2012-12-21
    9.3.2 IndexingYou just saw some examples of how indexed queries work in a sharded cluster. Ifyou’re ever unsure about how a given query will resolve, use explain() to get theanswer. This is usually straightforward, but a few more points about indexes should bekept in mind when running a sharded cluster. I’ll enumerate them here:1 Each shard maintains its own indexes. This should be obvious, but to be clear,know that when you declare an index on a sharded collection, each shard buildsa separate index for its portion of the collection. For example, when you issuedthe db.spreasheets.ensureIndex() command via mongos in the previous section, each individual shard processed the index creation command individually.2 It follows that the sharded collections on each shard should have the sa...