C100DBA practice question 15 of 25

The MongoDB explain() method does not support which of the following verbosity mode:

Full set: 130 questions
Answer options
A: executionStats
B: queryPlanner
C: customExecutionStats Correct answer
D: allPlansExecution
Correct Answer:
C. customExecutionStats
Explanation

The db.collection.explain() method in MongoDB provides information on the query plan. It accepts a verbosity mode parameter to control the amount of detail returned. The three valid verbosity modes are queryPlanner, executionStats, and allPlansExecution. The queryPlanner mode is the default. executionStats provides statistics about the winning plan's execution, and allPlansExecution provides execution statistics for all considered plans. customExecutionStats is not a recognized verbosity mode for the explain() method.

Why Incorrect

A. executionStats is a valid verbosity mode that returns statistics about the winning plan's execution.
B. queryPlanner is the default verbosity mode, showing the winning plan and rejected plans.
D. allPlansExecution is a valid verbosity mode that runs all candidate plans and provides execution statistics.

References

1. MongoDB Manual, db.collection.explain() page. (https://www.mongodb.com/docs/manual/reference/method/db.collection.explain/) The documentation explicitly lists the three accepted verbosity modes: "queryPlanner", "executionStats", and "allPlansExecution".

2. MongoDB University, M103: Basic Cluster Administration, Chapter 3: "Query Analysis". The course materials detail the use of explain() and its verbosity modes, confirming queryPlanner, executionStats, and allPlansExecution as the only valid options.

Scroll to Top