InterviewSolution
Saved Bookmarks
| 1. |
Point out the correct statement.(a) An equality match on the unique _id field is less selective as it can match at most one document(b) The selectivity of regular expressions depends on the expressions themselves(c) Less selective queries can use indexes effectively or even at all(d) All of the mentioned |
|
Answer» Correct option is (b) The selectivity of regular expressions depends on the expressions themselves The best explanation: If an index exists for the field, then MongoDB matches the regular expression against the values in the index, which can be faster than a collection scan. |
|