MongoDB DBA · 题目 348 · 单选

Consider the following set of commands in the mongo shell: use admin db.setLogLevel(5, "index") Which of the following statements is true after the logging level is changed by the above command? Choose the best answer:

题目选项

  1. A.
    Debug messages will be indexed in the log file
  2. B.
    Queries that require index access will be logged
  3. C.
    Only indexes created in the admin database will be logged
  4. D.
    Index management commands will be logged with debug severity
  5. E.
    Queries taking over 5 milliseconds will be logged with the index the used

答案置信度:高

正确答案:D

解析语言:中文

db.setLogLevel(5, "index") 是把 index 这个日志组件的详细度调到 5(debug),因此与索引相关的管理/操作会以 debug 级别写进日志(D)。它按组件生效而不是按数据库生效(A 错),不是给日志建索引(B 错),也与 5 毫秒的慢查询阈值无关(C 错)。 考生批注:可能为d

所在套题

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

作者 · 作品 · 开源

作者与 MongoDB 作品

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

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

联系作者 ↗mlhp123@outlook.com

支持作者

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

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