MongoDB DBA · Question 234 · Multiple choice

12. Which of the following operations may be faster after adding an index? Check all that apply:

Answer options

  1. A.
    db.collection.deleteOne()
  2. B.
    db.collection.find()
  3. C.
    db.collection.insertOne()

Answer confidence: High

Correct answer: B

Explanation language: Chinese

索引让查询只扫描命中的索引键并直接定位文档,因此 db.collection.find()(尤其带等值/范围条件的查询)可能变快。B、C 都是写操作:插入和删除都必须额外维护索引条目,只会变慢不会变快。

Papers containing this question

This question appears in 3 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗