Guest User

Untitled

a guest
Jul 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. ## > db.map.find({owner:{$gt:null}}).explain()
  2. {
  3. "cursor" : "BtreeCursor owner_1",
  4. "startKey" : {
  5. "owner" : null
  6. },
  7. "endKey" : {
  8. "owner" : {
  9. "$maxElement" : 1
  10. }
  11. },
  12. "nscanned" : 1000004,
  13. "n" : 0,
  14. "millis" : 946,
  15. "oldPlan" : {
  16. "cursor" : "BtreeCursor owner_1",
  17. "startKey" : {
  18. "owner" : null
  19. },
  20. "endKey" : {
  21. "owner" : {
  22. "$maxElement" : 1
  23. }
  24. }
  25. },
  26. "allPlans" : [
  27. {
  28. "cursor" : "BtreeCursor owner_1",
  29. "startKey" : {
  30. "owner" : null
  31. },
  32. "endKey" : {
  33. "owner" : {
  34. "$maxElement" : 1
  35. }
  36. }
  37. }
  38. ]
  39. }
  40.  
  41. ## > db.map.find({owner:{$ne:null}}).explain()
  42. {
  43. "cursor" : "BasicCursor",
  44. "startKey" : {
  45.  
  46. },
  47. "endKey" : {
  48.  
  49. },
  50. "nscanned" : 1000004,
  51. "n" : 4,
  52. "millis" : 535,
  53. "oldPlan" : {
  54. "cursor" : "BasicCursor",
  55. "startKey" : {
  56.  
  57. },
  58. "endKey" : {
  59.  
  60. }
  61. },
  62. "allPlans" : [
  63. {
  64. "cursor" : "BasicCursor",
  65. "startKey" : {
  66.  
  67. },
  68. "endKey" : {
  69.  
  70. }
  71. }
  72. ]
  73. }
  74.  
  75.  
  76. ## > db.map.find({owner:{$gt:""}}).explain()
  77. {
  78. "cursor" : "BtreeCursor owner_1",
  79. "startKey" : {
  80. "owner" : ""
  81. },
  82. "endKey" : {
  83. "owner" : {
  84.  
  85. }
  86. },
  87. "nscanned" : 0,
  88. "n" : 0,
  89. "millis" : 0,
  90. "allPlans" : [
  91. {
  92. "cursor" : "BtreeCursor owner_1",
  93. "startKey" : {
  94. "owner" : ""
  95. },
  96. "endKey" : {
  97. "owner" : {
  98.  
  99. }
  100. }
  101. }
  102. ]
  103. }
  104.  
  105. ## > db.map.find({owner:{$gt:{}}}).explain()
  106. {
  107. "cursor" : "BtreeCursor owner_1",
  108. "startKey" : {
  109. "owner" : {
  110.  
  111. }
  112. },
  113. "endKey" : {
  114. "owner" : {
  115. "$maxElement" : 1
  116. }
  117. },
  118. "nscanned" : 4,
  119. "n" : 4,
  120. "millis" : 0,
  121. "oldPlan" : {
  122. "cursor" : "BtreeCursor owner_1",
  123. "startKey" : {
  124. "owner" : {
  125.  
  126. }
  127. },
  128. "endKey" : {
  129. "owner" : {
  130. "$maxElement" : 1
  131. }
  132. }
  133. },
  134. "allPlans" : [
  135. {
  136. "cursor" : "BtreeCursor owner_1",
  137. "startKey" : {
  138. "owner" : {
  139.  
  140. }
  141. },
  142. "endKey" : {
  143. "owner" : {
  144. "$maxElement" : 1
  145. }
  146. }
  147. }
  148. ]
  149. }
Add Comment
Please, Sign In to add comment