explain_query_with_advice
Run EXPLAIN on a SQL query to get execution plan and index recommendations. Use literal values or ? with params array to avoid syntax errors from ${} placeholders.
Instructions
EXPLAIN + 索引建议。⚠️ 不支持 ${} 模板占位符(会被作为 SQL 字面量传给 EXPLAIN → 语法错)。用字面量值或 ? + params 数组。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| persist | No | true = 持久化 plan 以便后续 compare_query_plans | |
| profileName | No |