Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## > db.map.find({owner:{$gt:null}}).explain()
- {
- "cursor" : "BtreeCursor owner_1",
- "startKey" : {
- "owner" : null
- },
- "endKey" : {
- "owner" : {
- "$maxElement" : 1
- }
- },
- "nscanned" : 1000004,
- "n" : 0,
- "millis" : 946,
- "oldPlan" : {
- "cursor" : "BtreeCursor owner_1",
- "startKey" : {
- "owner" : null
- },
- "endKey" : {
- "owner" : {
- "$maxElement" : 1
- }
- }
- },
- "allPlans" : [
- {
- "cursor" : "BtreeCursor owner_1",
- "startKey" : {
- "owner" : null
- },
- "endKey" : {
- "owner" : {
- "$maxElement" : 1
- }
- }
- }
- ]
- }
- ## > db.map.find({owner:{$ne:null}}).explain()
- {
- "cursor" : "BasicCursor",
- "startKey" : {
- },
- "endKey" : {
- },
- "nscanned" : 1000004,
- "n" : 4,
- "millis" : 535,
- "oldPlan" : {
- "cursor" : "BasicCursor",
- "startKey" : {
- },
- "endKey" : {
- }
- },
- "allPlans" : [
- {
- "cursor" : "BasicCursor",
- "startKey" : {
- },
- "endKey" : {
- }
- }
- ]
- }
- ## > db.map.find({owner:{$gt:""}}).explain()
- {
- "cursor" : "BtreeCursor owner_1",
- "startKey" : {
- "owner" : ""
- },
- "endKey" : {
- "owner" : {
- }
- },
- "nscanned" : 0,
- "n" : 0,
- "millis" : 0,
- "allPlans" : [
- {
- "cursor" : "BtreeCursor owner_1",
- "startKey" : {
- "owner" : ""
- },
- "endKey" : {
- "owner" : {
- }
- }
- }
- ]
- }
- ## > db.map.find({owner:{$gt:{}}}).explain()
- {
- "cursor" : "BtreeCursor owner_1",
- "startKey" : {
- "owner" : {
- }
- },
- "endKey" : {
- "owner" : {
- "$maxElement" : 1
- }
- },
- "nscanned" : 4,
- "n" : 4,
- "millis" : 0,
- "oldPlan" : {
- "cursor" : "BtreeCursor owner_1",
- "startKey" : {
- "owner" : {
- }
- },
- "endKey" : {
- "owner" : {
- "$maxElement" : 1
- }
- }
- },
- "allPlans" : [
- {
- "cursor" : "BtreeCursor owner_1",
- "startKey" : {
- "owner" : {
- }
- },
- "endKey" : {
- "owner" : {
- "$maxElement" : 1
- }
- }
- }
- ]
- }
Add Comment
Please, Sign In to add comment