Created
November 21, 2018 20:00
-
-
Save stephencweiss/828e54a0745af11d399bfac670d79d55 to your computer and use it in GitHub Desktop.
An example find() command on a DB with 10m documents with an index explained
This file contains hidden or 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
//mongo sh | |
db.descriptions.find( {productId: {$gt : 9999990 } } ).explain("executionStats") | |
{ | |
"queryPlanner" : { | |
"plannerVersion" : 1, | |
"namespace" : "trailblazer.descriptions", | |
"indexFilterSet" : false, | |
"parsedQuery" : { | |
"productId" : { | |
"$gt" : 9999990 | |
} | |
}, | |
... | |
}, | |
"executionStats" : { | |
"executionSuccess" : true, | |
"nReturned" : 10, | |
"executionTimeMillis" : 1, | |
"totalKeysExamined" : 10, | |
"totalDocsExamined" : 10, | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment