1.

Point out the wrong statement.(a) The query scans the index and not the collection(b) If overall selectivity is high, and if MongoDB must read a number of documents to return results, then some queries may perform faster without indexes(c) A better strategy, depending on your queries, would be to create a compound index that includes the high-selectivity field and another field(d) None of the mentionedI got this question in my homework.This question is from Indexing Methods in chapter Index/Indexing Concepts of MongoDB

Answer»

Right answer is (b) If overall selectivity is high, and if MongoDB must READ a number of documents to return results, then some queries may perform FASTER without indexes

To EXPLAIN I would say: To ensure selectivity, write queries that limit the number of POSSIBLE documents with the INDEXED field. Write queries that are appropriately selective relative to your indexed data.



Discussion

No Comment Found

Related InterviewSolutions