whodb_explain
Analyze SQL query execution plans with native EXPLAIN output to identify excessive data scans before running the query.
Instructions
Run EXPLAIN for a SQL query using the database's native explain mode.
Best for: Understanding query plans; checking whether a query will scan too much data before you run the real query. Not recommended for: Fetching actual data (use whodb_query for that). Common mistakes: Passing a non-SQL string; forgetting that EXPLAIN output is database-specific.
Usage Example:
{
"name": "whodb_explain",
"arguments": {
"connection": "mydb",
"query": "SELECT * FROM users WHERE email LIKE '%@example.com' LIMIT 10"
}
}Returns: The database-native EXPLAIN output with columns and rows, ready for follow-up analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | Connection name (optional if only one exists) | |
| query | Yes | SQL query to explain |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | Yes | ||
| column_types | No | ||
| rows | Yes | ||
| error | No | ||
| request_id | No |