explain
Get execution statistics for MongoDB find, aggregate, and count queries to analyze the query optimizer's chosen plan and troubleshoot performance issues.
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 |
|---|---|---|---|
| method | Yes | The method and its arguments to run | |
| database | Yes | Database name | |
| 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 |
| collection | Yes | Collection name | |
| connectionId | Yes | The connection to run the operation against. Use the id returned by one of the connect tools, or "preconfigured" to use the connection string the server was configured with. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| verbosity | Yes | ||
| explainResult | Yes |