What is Selectivity of...
What is Selectivity of...
Selectivity in MongoDB refers to the ability of a query to narrow down the results using an index. It is a measure of how well a query predicate can exclude or filter out documents in a collection. More selective queries match a smaller percentage of documents, which allows MongoDB to use indexes more effectively, resulting in faster query execution.
Definition:
Impact on Performance:
Index Design:
Examples:
_id
is highly selective because it can match at most one document.Query Optimization:
senior
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào