Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > db.users.find({"lastName": "S", "firstName": "w"}).explain()
- {
- "queryPlanner" : {
- "plannerVersion" : 1,
- "namespace" : "fetchData.users",
- "indexFilterSet" : false,
- "parsedQuery" : {
- "$and" : [
- {
- "firstName" : {
- "$eq" : "w"
- }
- },
- {
- "lastName" : {
- "$eq" : "S"
- }
- }
- ]
- },
- "winningPlan" : {
- "stage" : "FETCH",
- "filter" : {
- "firstName" : {
- "$eq" : "w"
- }
- },
- "inputStage" : {
- "stage" : "IXSCAN",
- "keyPattern" : {
- "lastName" : 1
- },
- "indexName" : "lastName_1",
- "isMultiKey" : false,
- "multiKeyPaths" : {
- "lastName" : [ ]
- },
- "isUnique" : false,
- "isSparse" : false,
- "isPartial" : false,
- "indexVersion" : 2,
- "direction" : "forward",
- "indexBounds" : {
- "lastName" : [
- "[\"S\", \"S\"]"
- ]
- }
- }
- },
- "rejectedPlans" : [
- {
- "stage" : "FETCH",
- "filter" : {
- "lastName" : {
- "$eq" : "S"
- }
- },
- "inputStage" : {
- "stage" : "IXSCAN",
- "keyPattern" : {
- "firstName" : 1
- },
- "indexName" : "firstName_1",
- "isMultiKey" : false,
- "multiKeyPaths" : {
- "firstName" : [ ]
- },
- "isUnique" : false,
- "isSparse" : false,
- "isPartial" : false,
- "indexVersion" : 2,
- "direction" : "forward",
- "indexBounds" : {
- "firstName" : [
- "[\"w\", \"w\"]"
- ]
- }
- }
- },
- {
- "stage" : "FETCH",
- "filter" : {
- "$and" : [
- {
- "lastName" : {
- "$eq" : "S"
- }
- },
- {
- "firstName" : {
- "$eq" : "w"
- }
- }
- ]
- },
- "inputStage" : {
- "stage" : "AND_SORTED",
- "inputStages" : [
- {
- "stage" : "IXSCAN",
- "keyPattern" : {
- "lastName" : 1
- },
- "indexName" : "lastName_1",
- "isMultiKey" : false,
- "multiKeyPaths" : {
- "lastName" : [ ]
- },
- "isUnique" : false,
- "isSparse" : false,
- "isPartial" : false,
- "indexVersion" : 2,
- "direction" : "forward",
- "indexBounds" : {
- "lastName" : [
- "[\"S\", \"S\"]"
- ]
- }
- },
- {
- "stage" : "IXSCAN",
- "keyPattern" : {
- "firstName" : 1
- },
- "indexName" : "firstName_1",
- "isMultiKey" : false,
- "multiKeyPaths" : {
- "firstName" : [ ]
- },
- "isUnique" : false,
- "isSparse" : false,
- "isPartial" : false,
- "indexVersion" : 2,
- "direction" : "forward",
- "indexBounds" : {
- "firstName" : [
- "[\"w\", \"w\"]"
- ]
- }
- }
- ]
- }
- }
- ]
- },
- "serverInfo" : {
- "host" : "laptop",
- "port" : 27017,
- "version" : "3.4.1",
- "gitVersion" : "5e103c4f5583e2566a45d740225dc250baacfbd7"
- },
- "ok" : 1
- }
- >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement