Skip to content

Instantly share code, notes, and snippets.

@MuhammadJamaluddin
Last active June 21, 2019 00:18
Show Gist options
  • Save MuhammadJamaluddin/5b15b4c09944be8176a7768c2ad8be9a to your computer and use it in GitHub Desktop.
Save MuhammadJamaluddin/5b15b4c09944be8176a7768c2ad8be9a to your computer and use it in GitHub Desktop.
> db.books.find({"_id": 1000}).explain("executionStats");
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "books.books",
"indexFilterSet" : false,
"parsedQuery" : {
"_id" : {
"$eq" : 1000
}
},
"winningPlan" : {
"stage" : "IDHACK"
},
"rejectedPlans" : [ ]
},
"executionStats" : {
"executionSuccess" : true,
"nReturned" : 1,
"executionTimeMillis" : 4,
"totalKeysExamined" : 1,
"totalDocsExamined" : 1,
"executionStages" : {
"stage" : "IDHACK",
"nReturned" : 1,
"executionTimeMillisEstimate" : 0,
"works" : 2,
"advanced" : 1,
"needTime" : 0,
"needYield" : 0,
"saveState" : 0,
"restoreState" : 0,
"isEOF" : 1,
"invalidates" : 0,
"keysExamined" : 1,
"docsExamined" : 1
}
},
"serverInfo" : {
"host" : "ip-172-31-31-232",
"port" : 27017,
"version" : "4.0.10",
"gitVersion" : "c389e7f69f637f7a1ac3cc9fae843b635f20b766"
},
"ok" : 1
}
> db.books.find({"_id": 8000000}).explain("executionStats");
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "books.books",
"indexFilterSet" : false,
"parsedQuery" : {
"_id" : {
"$eq" : 8000000
}
},
"winningPlan" : {
"stage" : "IDHACK"
},
"rejectedPlans" : [ ]
},
"executionStats" : {
"executionSuccess" : true,
"nReturned" : 1,
"executionTimeMillis" : 2,
"totalKeysExamined" : 1,
"totalDocsExamined" : 1,
"executionStages" : {
"stage" : "IDHACK",
"nReturned" : 1,
"executionTimeMillisEstimate" : 0,
"works" : 2,
"advanced" : 1,
"needTime" : 0,
"needYield" : 0,
"saveState" : 0,
"restoreState" : 0,
"isEOF" : 1,
"invalidates" : 0,
"keysExamined" : 1,
"docsExamined" : 1
}
},
"serverInfo" : {
"host" : "ip-172-31-31-232",
"port" : 27017,
"version" : "4.0.10",
"gitVersion" : "c389e7f69f637f7a1ac3cc9fae843b635f20b766"
},
"ok" : 1
}
> db.books.find({"_id": 9000000}).explain("executionStats");
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "books.books",
"indexFilterSet" : false,
"parsedQuery" : {
"_id" : {
"$eq" : 9000000
}
},
"winningPlan" : {
"stage" : "IDHACK"
},
"rejectedPlans" : [ ]
},
"executionStats" : {
"executionSuccess" : true,
"nReturned" : 1,
"executionTimeMillis" : 2,
"totalKeysExamined" : 1,
"totalDocsExamined" : 1,
"executionStages" : {
"stage" : "IDHACK",
"nReturned" : 1,
"executionTimeMillisEstimate" : 0,
"works" : 2,
"advanced" : 1,
"needTime" : 0,
"needYield" : 0,
"saveState" : 0,
"restoreState" : 0,
"isEOF" : 1,
"invalidates" : 0,
"keysExamined" : 1,
"docsExamined" : 1
}
},
"serverInfo" : {
"host" : "ip-172-31-31-232",
"port" : 27017,
"version" : "4.0.10",
"gitVersion" : "c389e7f69f637f7a1ac3cc9fae843b635f20b766"
},
"ok" : 1
}
> db.books.find({"_id": 9507060}).explain("executionStats");
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "books.books",
"indexFilterSet" : false,
"parsedQuery" : {
"_id" : {
"$eq" : 9507060
}
},
"winningPlan" : {
"stage" : "IDHACK"
},
"rejectedPlans" : [ ]
},
"executionStats" : {
"executionSuccess" : true,
"nReturned" : 1,
"executionTimeMillis" : 2,
"totalKeysExamined" : 1,
"totalDocsExamined" : 1,
"executionStages" : {
"stage" : "IDHACK",
"nReturned" : 1,
"executionTimeMillisEstimate" : 0,
"works" : 2,
"advanced" : 1,
"needTime" : 0,
"needYield" : 0,
"saveState" : 0,
"restoreState" : 0,
"isEOF" : 1,
"invalidates" : 0,
"keysExamined" : 1,
"docsExamined" : 1
}
},
"serverInfo" : {
"host" : "ip-172-31-31-232",
"port" : 27017,
"version" : "4.0.10",
"gitVersion" : "c389e7f69f637f7a1ac3cc9fae843b635f20b766"
},
"ok" : 1
}
> db.books.find({"_id": 9907060}).explain("executionStats");
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "books.books",
"indexFilterSet" : false,
"parsedQuery" : {
"_id" : {
"$eq" : 9907060
}
},
"winningPlan" : {
"stage" : "IDHACK"
},
"rejectedPlans" : [ ]
},
"executionStats" : {
"executionSuccess" : true,
"nReturned" : 1,
"executionTimeMillis" : 2,
"totalKeysExamined" : 1,
"totalDocsExamined" : 1,
"executionStages" : {
"stage" : "IDHACK",
"nReturned" : 1,
"executionTimeMillisEstimate" : 0,
"works" : 2,
"advanced" : 1,
"needTime" : 0,
"needYield" : 0,
"saveState" : 0,
"restoreState" : 0,
"isEOF" : 1,
"invalidates" : 0,
"keysExamined" : 1,
"docsExamined" : 1
}
},
"serverInfo" : {
"host" : "ip-172-31-31-232",
"port" : 27017,
"version" : "4.0.10",
"gitVersion" : "c389e7f69f637f7a1ac3cc9fae843b635f20b766"
},
"ok" : 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment