Skip to content

Instantly share code, notes, and snippets.

@wombleton
Created November 1, 2015 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wombleton/ba549f894db41d27a46f to your computer and use it in GitHub Desktop.
Save wombleton/ba549f894db41d27a46f to your computer and use it in GitHub Desktop.
$> db.tiles.find({}).sort({ 'voteCount': 1, 'hash': 1}).skip(1000).limit(10).explain()
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "heroku_app35335042.tiles",
"indexFilterSet" : false,
"parsedQuery" : {
"$and" : [ ]
},
"winningPlan" : {
"stage" : "LIMIT",
"limitAmount" : 10,
"inputStage" : {
"stage" : "SKIP",
"skipAmount" : 1000,
"inputStage" : {
"stage" : "FETCH",
"inputStage" : {
"stage" : "IXSCAN",
"keyPattern" : {
"voteCount" : 1,
"hash" : 1
},
"indexName" : "voteCount_1_hash_1",
"isMultiKey" : false,
"direction" : "forward",
"indexBounds" : {
"voteCount" : [
"[MinKey, MaxKey]"
],
"hash" : [
"[MinKey, MaxKey]"
]
}
}
}
}
},
"rejectedPlans" : [ ]
},
"serverInfo" : {
"host" : "h014245.mongolab.com",
"port" : 61601,
"version" : "3.0.7",
"gitVersion" : "6ce7cbe8c6b899552dadd907604559806aa2e9bd"
},
"ok" : 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment