> db.foo.ensureIndex(
{ a : 1 } )
true
> db.foo.ensureIndex(
)
true
> db.foo.find(
).explain()
{"cursor" : "BtreeCursor a_1" , "startKey" :
, "endKey" :
{"a" : 1}, "nscanned" : 2 , "n" : 2 , "millis" : 0 , "allPlans" : [{"cursor" : "BtreeCursor a_1" , "startKey" :
{"a" : 1} , "endKey" : {"a" : 1}}]}
> db.foo.find( { $or : [
,
{ b : 1 } } ).explain()
Wed Jun 17 06:57:15 JS Error: SyntaxError: missing ] after element list (anon):2147
> db.foo.find( { $or : [
,
{ b : 1 } ] ).explain()
Wed Jun 17 06:57:20 JS Error: SyntaxError: missing } after property list (anon):2147
> db.foo.find( { $or : [
,
{ b : 1 } ] } ).explain()
{"cursor" : "BasicCursor" , "startKey" : {} , "endKey" : {} , "nscanned" : 3 , "n" : 0 , "millis" : 0 , "allPlans" : [{"cursor" : "BasicCursor" , "startKey" : {} , "endKey" : {}}]}
> for ( i=0; i<2000; i++ ){ db.foo.save(
); }
> for ( i=0; i<2000; i++ ){ db.foo.save(
); }
> for ( i=0; i<2000; i++ ){ db.foo.save(
); }
> db.foo.find( { $or : [
,
{ b : 1 } ] } ).explain()
{"cursor" : "BasicCursor" , "startKey" : {} , "endKey" : {} , "nscanned" : 6003 , "n" : 0 , "millis" : 2 , "allPlans" : [{"cursor" : "BasicCursor" , "startKey" : {} , "endKey" : {}}]}
- depends on
-
SERVER-205 $or
- Closed
- is depended on by
-
SERVER-205 $or
- Closed