diff options
author | Aaron <aaron@10gen.com> | 2012-02-14 09:30:08 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2012-02-24 22:49:08 -0800 |
commit | afc4e7fe813a753bf24414ff1385226d8ebbbd86 (patch) | |
tree | 8f9e15194fb18651a9c7e73635fe7a5c6176758b /jstests/indexj.js | |
parent | cb40560b1a085f9cd0e632b3e6879d6611df10dc (diff) | |
download | mongo-afc4e7fe813a753bf24414ff1385226d8ebbbd86.tar.gz |
4150 explain implementation checkpoint
Diffstat (limited to 'jstests/indexj.js')
-rw-r--r-- | jstests/indexj.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/indexj.js b/jstests/indexj.js index 0d1afc29b50..6d8ac85c972 100644 --- a/jstests/indexj.js +++ b/jstests/indexj.js @@ -28,17 +28,17 @@ t.save( { a:1,b:2 } ); t.save( { a:2,b:1 } ); t.save( { a:2,b:2 } ); -assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).explain().nscanned ); -assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).sort( {a:-1,b:-1} ).explain().nscanned ); +assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).hint( {a:1,b:1} ).explain().nscanned ); +assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).hint( {a:1,b:1} ).sort( {a:-1,b:-1} ).explain().nscanned ); t.save( {a:1,b:1} ); t.save( {a:1,b:1} ); -assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).explain().nscanned ); -assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).explain().nscanned ); -assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).sort( {a:-1,b:-1} ).explain().nscanned ); +assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).hint( {a:1,b:1} ).explain().nscanned ); +assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).hint( {a:1,b:1} ).explain().nscanned ); +assert.eq( 2, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).hint( {a:1,b:1} ).sort( {a:-1,b:-1} ).explain().nscanned ); -assert.eq( 1, t.find( { a:{$in:[1,1.9]}, b:{$gt:1,$lt:2} } ).explain().nscanned ); -assert.eq( 1, t.find( { a:{$in:[1.1,2]}, b:{$gt:1,$lt:2} } ).sort( {a:-1,b:-1} ).explain().nscanned ); +assert.eq( 1, t.find( { a:{$in:[1,1.9]}, b:{$gt:1,$lt:2} } ).hint( {a:1,b:1} ).explain().nscanned ); +assert.eq( 1, t.find( { a:{$in:[1.1,2]}, b:{$gt:1,$lt:2} } ).hint( {a:1,b:1} ).sort( {a:-1,b:-1} ).explain().nscanned ); t.save( { a:1,b:1.5} ); -assert.eq( 3, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).explain().nscanned, "F" ); +assert.eq( 3, t.find( { a:{$in:[1,2]}, b:{$gt:1,$lt:2} } ).hint( {a:1,b:1} ).explain().nscanned, "F" ); |