MongoDB tips: using explainable object
This is just to quickly document an alternative way to run explain plan assuming this is the query we want to run explain plan 2019-10-12T06:10:44.366-0400 I COMMAND [conn25251540] command device-event-store.events command: find { find: "events", filter: { $and: [ { aggregateId: { identifier: "990003494014489" } }, { version: { $gte: 0 } } ] }, sort: { version: 1 }, $db: "device-event-store", $clusterTime: { clusterTime: Timestamp(1570875044, 17), signature: { hash: BinData(0, 502D14059FA04824080CA91DAB899D434CFA3E87), keyId: 6727232173650214920 } }, lsid: { id: UUID("91bed447-28f5-4211-b3f8-58821d04060d") } } planSummary: COLLSCAN keysExamined:0 docsExamined:56299 hasSortStage:1 cursorExhausted:1 numYields:441 nreturned:78 reslen:44800 locks:{ Global: { acquireCount: { r: 884 } }, Database: { acquireCount: { r: 442 } }, Collection: { acquireCount: { r: 442 } } } protocol:op_msg 232ms first let's create an explainable object with execut...