MongoDB DBA · 题目 501 · 多选

18. Indexes are created to optimize the execution of certain operations, but they can also worsen the performance of other operations. Assuming all your indexes fit into RAM, which of the following operations might experience worse performance after adding indexes to your collection? Check all that apply:

题目选项

  1. A.
    Inserts
  2. B.
    Finds with Sort
  3. C.
    Bulk Delete

答案置信度:高

正确答案:A、C

解析语言:中文

增加索引后每次写操作都要同步维护索引:插入文档时必须为每个相关索引插入键,所以 Inserts 变慢;删除文档时也必须从所有索引中删除对应键,批量删除尤其明显。C(带排序的查找)恰恰是索引的受益者,索引可以同时提供过滤条件和排序顺序、避免内存排序,因此不会变慢。

所在套题

此题在题库中有 1 条记录。公开详情合并相同题干和选项;完整公开题展示置信度最高的一条记录,其他题目仅展示摘要。按套学习保留每条记录原有的答案、解析和置信度。

作者 · 作品 · 开源

作者与 MongoDB 作品

专注数据平台、MongoDB 迁移同步与云运维产品研发。

有任何 MongoDB 需求,均可联系作者。

联系作者 ↗mlhp123@outlook.com

支持作者

如果题库对您有帮助,欢迎自愿扫码打赏。

支付宝扫码打赏作者打开打赏原图 ↗