What is the explain's default option?

The document says: The default verbosity for explain is allPlansExecution like below.

The possible modes are:

  • "queryPlanner"
  • "executionStats"
  • "allPlansExecution" (Default)

But in the DBA Practice exam, it says the correct answer is queryPlanner. Can someone explain to me this confusion?

1 Like

Hello @Yunus_UYANIK, welcome to the MongoDB Community forum!

The link you had provided (and referred above) is for the explain database command.

The exam is referring to the db.collection.explain method. The documentation says the same thing as that of the exam problem’s answer. The explain() method’s verbosity parameter description:

verbosity string
Optional. Specifies the verbosity mode for the explain output. The mode affects the behavior of explain() and determines the amount of information to return. The possible modes are:

“queryPlanner” (Default)
“executionStats”
“allPlansExecution”

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.