explain
Retrieve execution statistics for a MongoDB query's winning plan by specifying database, collection, and method (find, aggregate, or count) with optional verbosity levels.
Instructions
Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database name | |
| collection | Yes | Collection name | |
| method | Yes | The method and its arguments to run | |
| verbosity | No | The verbosity of the explain plan, defaults to queryPlanner. If the user wants to know how fast is a query in execution time, use executionStats. It supports all verbosities as defined in the MongoDB Driver. | queryPlanner |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| explainResult | Yes | ||
| method | Yes | ||
| verbosity | Yes |