nerdexam
MongoDB

C100DBA · Question #107

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

You've hit your limit · resets 12:50am (America/New_York)

Performance Tuning

Question

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.

Options

  • Adb.test.find( { a: 5, b: 3 } ).sort( { c: 1, d : 1 } )
  • Bdb.test.find( { a: 5, b: 3 } ).sort( { a: 1} )
  • Cdb.test.find( { a: 5, b: 3 } ).sort( { a: 1, b: 1, c: 1 > )
  • Ddb.test.find( { a: 5, b: 3 } ).sort( {c: 1 } )

Explanation

You've hit your limit · resets 12:50am (America/New_York)

Topics

#compound index#in-memory sort#index prefix#query optimization

Community Discussion

No community discussion yet for this question.

Full C100DBA Practice