Created
January 16, 2018 12:00
-
-
Save ciudilo/317b1b13898e8faef1c3fde65f916e0c to your computer and use it in GitHub Desktop.
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
| connecting to: test | |
| Mongo-Hacker 0.0.14 | |
| kiril-mbp(mongod-3.6.1 )[PRIMARY:rs1] test> show collections | |
| arrays → 0.000MB / 0.016MB | |
| compound → 1747.519MB / 578.426MB | |
| fs.chunks → 0.352MB / 0.348MB | |
| fs.files → 0.000MB / 0.016MB | |
| hash → 0.000MB / 0.031MB | |
| movies → 0.000MB / 0.035MB | |
| names → 0.000MB / 0.016MB | |
| people → 0.000MB / 0.016MB | |
| routes → 11.763MB / 2.617MB | |
| system.profile → 0.004MB / 0.031MB | |
| test → 0.000MB / 0.035MB | |
| testcol → 27.329MB / 11.359MB | |
| timestamp → 0.000MB / 0.016MB | |
| users → 0.000MB / 0.004MB | |
| kiril-mbp(mongod-3.6.1 )[PRIMARY:rs1] test> db.compound.count() | |
| 41645604 | |
| kiril-mbp(mongod-3.6.1 )[PRIMARY:rs1] test> db.compound.getIndexes() | |
| [ | |
| { | |
| "v": 2, | |
| "key": { | |
| "_id": 1 | |
| }, | |
| "name": "_id_", | |
| "ns": "test.compound" | |
| }, | |
| { | |
| "v": 2, | |
| "key": { | |
| "a": 1, | |
| "b": 1 | |
| }, | |
| "name": "a_1_b_1", | |
| "ns": "test.compound" | |
| }, | |
| { | |
| "v": 2, | |
| "key": { | |
| "b": 1, | |
| "a": 1 | |
| }, | |
| "name": "b_1_a_1", | |
| "ns": "test.compound" | |
| } | |
| ] | |
| kiril-mbp(mongod-3.6.1 )[PRIMARY:rs1] test> db.compound.find({a:1, b: 123453}).hint({b:1, a:1}).explain("executionStats") | |
| { | |
| "queryPlanner": { | |
| "plannerVersion": 1, | |
| "namespace": "test.compound", | |
| "indexFilterSet": false, | |
| "parsedQuery": { | |
| "$and": [ | |
| { | |
| "a": { | |
| "$eq": 1 | |
| } | |
| }, | |
| { | |
| "b": { | |
| "$eq": 123453 | |
| } | |
| } | |
| ] | |
| }, | |
| "winningPlan": { | |
| "stage": "FETCH", | |
| "inputStage": { | |
| "stage": "IXSCAN", | |
| "keyPattern": { | |
| "b": 1, | |
| "a": 1 | |
| }, | |
| "indexName": "b_1_a_1", | |
| "isMultiKey": false, | |
| "multiKeyPaths": { | |
| "b": [ ], | |
| "a": [ ] | |
| }, | |
| "isUnique": false, | |
| "isSparse": false, | |
| "isPartial": false, | |
| "indexVersion": 2, | |
| "direction": "forward", | |
| "indexBounds": { | |
| "b": [ | |
| "[123453.0, 123453.0]" | |
| ], | |
| "a": [ | |
| "[1.0, 1.0]" | |
| ] | |
| } | |
| } | |
| }, | |
| "rejectedPlans": [ ] | |
| }, | |
| "executionStats": { | |
| "executionSuccess": true, | |
| "nReturned": 2, | |
| "executionTimeMillis": 7, | |
| "totalKeysExamined": 2, | |
| "totalDocsExamined": 2, | |
| "executionStages": { | |
| "stage": "FETCH", | |
| "nReturned": 2, | |
| "executionTimeMillisEstimate": 0, | |
| "works": 3, | |
| "advanced": 2, | |
| "needTime": 0, | |
| "needYield": 0, | |
| "saveState": 0, | |
| "restoreState": 0, | |
| "isEOF": 1, | |
| "invalidates": 0, | |
| "docsExamined": 2, | |
| "alreadyHasObj": 0, | |
| "inputStage": { | |
| "stage": "IXSCAN", | |
| "nReturned": 2, | |
| "executionTimeMillisEstimate": 0, | |
| "works": 3, | |
| "advanced": 2, | |
| "needTime": 0, | |
| "needYield": 0, | |
| "saveState": 0, | |
| "restoreState": 0, | |
| "isEOF": 1, | |
| "invalidates": 0, | |
| "keyPattern": { | |
| "b": 1, | |
| "a": 1 | |
| }, | |
| "indexName": "b_1_a_1", | |
| "isMultiKey": false, | |
| "multiKeyPaths": { | |
| "b": [ ], | |
| "a": [ ] | |
| }, | |
| "isUnique": false, | |
| "isSparse": false, | |
| "isPartial": false, | |
| "indexVersion": 2, | |
| "direction": "forward", | |
| "indexBounds": { | |
| "b": [ | |
| "[123453.0, 123453.0]" | |
| ], | |
| "a": [ | |
| "[1.0, 1.0]" | |
| ] | |
| }, | |
| "keysExamined": 2, | |
| "seeks": 1, | |
| "dupsTested": 0, | |
| "dupsDropped": 0, | |
| "seenInvalidated": 0 | |
| } | |
| } | |
| }, | |
| "serverInfo": { | |
| "host": "kiril-mbp.local", | |
| "port": 27017, | |
| "version": "3.6.1", | |
| "gitVersion": "025d4f4fe61efd1fb6f0005be20cb45a004093d1" | |
| }, | |
| "ok": 1, | |
| "operationTime": Timestamp(1516103841, 1) | |
| } | |
| kiril-mbp(mongod-3.6.1 )[PRIMARY:rs1] test> db.compound.find({a:1, b: 123453}).hint({a:1, b:1}).explain("executionStats") | |
| { | |
| "queryPlanner": { | |
| "plannerVersion": 1, | |
| "namespace": "test.compound", | |
| "indexFilterSet": false, | |
| "parsedQuery": { | |
| "$and": [ | |
| { | |
| "a": { | |
| "$eq": 1 | |
| } | |
| }, | |
| { | |
| "b": { | |
| "$eq": 123453 | |
| } | |
| } | |
| ] | |
| }, | |
| "winningPlan": { | |
| "stage": "FETCH", | |
| "inputStage": { | |
| "stage": "IXSCAN", | |
| "keyPattern": { | |
| "a": 1, | |
| "b": 1 | |
| }, | |
| "indexName": "a_1_b_1", | |
| "isMultiKey": false, | |
| "multiKeyPaths": { | |
| "a": [ ], | |
| "b": [ ] | |
| }, | |
| "isUnique": false, | |
| "isSparse": false, | |
| "isPartial": false, | |
| "indexVersion": 2, | |
| "direction": "forward", | |
| "indexBounds": { | |
| "a": [ | |
| "[1.0, 1.0]" | |
| ], | |
| "b": [ | |
| "[123453.0, 123453.0]" | |
| ] | |
| } | |
| } | |
| }, | |
| "rejectedPlans": [ ] | |
| }, | |
| "executionStats": { | |
| "executionSuccess": true, | |
| "nReturned": 2, | |
| "executionTimeMillis": 2, | |
| "totalKeysExamined": 2, | |
| "totalDocsExamined": 2, | |
| "executionStages": { | |
| "stage": "FETCH", | |
| "nReturned": 2, | |
| "executionTimeMillisEstimate": 0, | |
| "works": 3, | |
| "advanced": 2, | |
| "needTime": 0, | |
| "needYield": 0, | |
| "saveState": 0, | |
| "restoreState": 0, | |
| "isEOF": 1, | |
| "invalidates": 0, | |
| "docsExamined": 2, | |
| "alreadyHasObj": 0, | |
| "inputStage": { | |
| "stage": "IXSCAN", | |
| "nReturned": 2, | |
| "executionTimeMillisEstimate": 0, | |
| "works": 3, | |
| "advanced": 2, | |
| "needTime": 0, | |
| "needYield": 0, | |
| "saveState": 0, | |
| "restoreState": 0, | |
| "isEOF": 1, | |
| "invalidates": 0, | |
| "keyPattern": { | |
| "a": 1, | |
| "b": 1 | |
| }, | |
| "indexName": "a_1_b_1", | |
| "isMultiKey": false, | |
| "multiKeyPaths": { | |
| "a": [ ], | |
| "b": [ ] | |
| }, | |
| "isUnique": false, | |
| "isSparse": false, | |
| "isPartial": false, | |
| "indexVersion": 2, | |
| "direction": "forward", | |
| "indexBounds": { | |
| "a": [ | |
| "[1.0, 1.0]" | |
| ], | |
| "b": [ | |
| "[123453.0, 123453.0]" | |
| ] | |
| }, | |
| "keysExamined": 2, | |
| "seeks": 1, | |
| "dupsTested": 0, | |
| "dupsDropped": 0, | |
| "seenInvalidated": 0 | |
| } | |
| } | |
| }, | |
| "serverInfo": { | |
| "host": "kiril-mbp.local", | |
| "port": 27017, | |
| "version": "3.6.1", | |
| "gitVersion": "025d4f4fe61efd1fb6f0005be20cb45a004093d1" | |
| }, | |
| "ok": 1, | |
| "operationTime": Timestamp(1516103851, 1) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment