Created
May 8, 2012 15:20
-
-
Save kgorman/2636220 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongos> version() | |
version: 2.0.4 | |
mongos> db.collections.find() | |
{ "_id" : "test.testCollection", "lastmod" : ISODate("1970-01-16T11:14:38.015Z"), "dropped" : false, "key" : { "shardkey" : 1 }, "unique" : false } | |
mongos> db.testCollection.find({_id:111}).explain() | |
{ | |
"clusteredType" : "ParallelSort", | |
"shards" : { | |
"brick1:27000" : [ | |
{ | |
"cursor" : "BtreeCursor _id_", | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"n" : 0, | |
"millis" : 0, | |
"nYields" : 0, | |
"nChunkSkips" : 0, | |
"isMultiKey" : false, | |
"indexOnly" : false, | |
"indexBounds" : { | |
"_id" : [ | |
[ | |
111, | |
111 | |
] | |
] | |
} | |
} | |
], | |
"brick1:27001" : [ | |
{ | |
"cursor" : "BtreeCursor _id_", | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"n" : 0, | |
"millis" : 0, | |
"nYields" : 0, | |
"nChunkSkips" : 0, | |
"isMultiKey" : false, | |
"indexOnly" : false, | |
"indexBounds" : { | |
"_id" : [ | |
[ | |
111, | |
111 | |
] | |
] | |
} | |
} | |
], | |
"brick2:27000" : [ | |
{ | |
"cursor" : "BtreeCursor _id_", | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"n" : 0, | |
"millis" : 0, | |
"nYields" : 0, | |
"nChunkSkips" : 0, | |
"isMultiKey" : false, | |
"indexOnly" : false, | |
"indexBounds" : { | |
"_id" : [ | |
[ | |
111, | |
111 | |
] | |
] | |
} | |
} | |
], | |
"brick2:27001" : [ | |
{ | |
"cursor" : "BtreeCursor _id_", | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"n" : 0, | |
"millis" : 0, | |
"nYields" : 0, | |
"nChunkSkips" : 0, | |
"isMultiKey" : false, | |
"indexOnly" : false, | |
"indexBounds" : { | |
"_id" : [ | |
[ | |
111, | |
111 | |
] | |
] | |
} | |
} | |
], | |
"brick3:27000" : [ | |
{ | |
"cursor" : "BtreeCursor _id_", | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"n" : 0, | |
"millis" : 0, | |
"nYields" : 0, | |
"nChunkSkips" : 0, | |
"isMultiKey" : false, | |
"indexOnly" : false, | |
"indexBounds" : { | |
"_id" : [ | |
[ | |
111, | |
111 | |
] | |
] | |
} | |
} | |
], | |
"brick3:27001" : [ | |
{ | |
"cursor" : "BtreeCursor _id_", | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"n" : 0, | |
"millis" : 0, | |
"nYields" : 0, | |
"nChunkSkips" : 0, | |
"isMultiKey" : false, | |
"indexOnly" : false, | |
"indexBounds" : { | |
"_id" : [ | |
[ | |
111, | |
111 | |
] | |
] | |
} | |
} | |
] | |
}, | |
"n" : 0, | |
"nChunkSkips" : 0, | |
"nYields" : 0, | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"millisTotal" : 0, | |
"millisAvg" : 0, | |
"numQueries" : 6, | |
"numShards" : 6 | |
} | |
mongos> db.testCollection.find({shardkey:111}).explain() | |
{ | |
"clusteredType" : "ParallelSort", | |
"shards" : { | |
"brick1:27000" : [ | |
{ | |
"cursor" : "BtreeCursor shardkey_1", | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"n" : 0, | |
"millis" : 0, | |
"nYields" : 0, | |
"nChunkSkips" : 0, | |
"isMultiKey" : false, | |
"indexOnly" : false, | |
"indexBounds" : { | |
"shardkey" : [ | |
[ | |
111, | |
111 | |
] | |
] | |
} | |
} | |
] | |
}, | |
"n" : 0, | |
"nChunkSkips" : 0, | |
"nYields" : 0, | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"millisTotal" : 0, | |
"millisAvg" : 0, | |
"numQueries" : 1, | |
"numShards" : 1 | |
} | |
mongos> db.testCollection.find({shardkey:111,_id:999}).explain() | |
{ | |
"clusteredType" : "ParallelSort", | |
"shards" : { | |
"brick1:27000" : [ | |
{ | |
"cursor" : "BtreeCursor _id_", | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"n" : 0, | |
"millis" : 0, | |
"nYields" : 0, | |
"nChunkSkips" : 0, | |
"isMultiKey" : false, | |
"indexOnly" : false, | |
"indexBounds" : { | |
"_id" : [ | |
[ | |
999, | |
999 | |
] | |
] | |
} | |
} | |
] | |
}, | |
"n" : 0, | |
"nChunkSkips" : 0, | |
"nYields" : 0, | |
"nscanned" : 0, | |
"nscannedObjects" : 0, | |
"millisTotal" : 0, | |
"millisAvg" : 0, | |
"numQueries" : 1, | |
"numShards" : 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment