Below is a sample document in a given collection test.
{ a : 5, b : 3, c: 2, d : 1 >
Given a compound index { a: 1, b:l, c:l, d:l}, Which of the below query will not use in- memory sorting? Select all valid.
- db.test.find( { a: 5, b: 3 } ).sort( { c: 1, d : 1 } )
- db.test.find( { a: 5, b: 3 } ).sort( { a: 1} )
- db.test.find( { a: 5, b: 3 } ).sort( { a: 1, b: 1, c: 1 > )
- db.test.find( { a: 5, b: 3 } ).sort( {c: 1 } )
Reveal Solution Next Question