Following command can be used to evaluate query performance of a MongoDB Collection:
db.<collectionName>.find().explain("executionStats");
The above command would print result such as following. COLLSCAN represents the collection scan.
{ "queryPlanner" : { "plannerVersion" : 1, "namespace" : "vitalflux.user", "indexFilterSet" : false, "parsedQuery" : { }, "winningPlan" : { "stage" : "COLLSCAN", "direction" : "forward" }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 100, "executionTimeMillis" : 0, "totalKeysExamined" : 0, "totalDocsExamined" : 100, "executionStages" : { "stage" : "COLLSCAN", "nReturned" : 100, "executionTimeMillisEstimate" : 0, "works" : 102, "advanced" : 100, "needTime" : 1, "needYield" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "invalidates" : 0, "direction" : "forward", "docsExamined" : 100 } }, "serverInfo" : { "host" : "rs-HP83", "port" : 27017, "version" : "3.4.6", "gitVersion" : "c55eb86ef46ee7aede3b1e2a5d184a7df4bfb5b5" }, "ok" : 1 }
Following are some of the metrics to watchout for when evaluating query performance:
In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…
Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…
With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…
Anxiety is a common mental health condition that affects millions of people around the world.…
In machine learning, confounder features or variables can significantly affect the accuracy and validity of…
Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…