explain_query
Generate and analyze CockroachDB query execution plans to optimize SQL performance. Use EXPLAIN or EXPLAIN ANALYZE to understand and improve query efficiency.
Instructions
Return CockroachDB's statement plan for a preparable statement. You can use this information to optimize the query. If you run it with Analyze, it executes the SQL query and generates a statement plan with execution statistics.
Args: query (str): SQL query to explain. analyze (bool): If True, run EXPLAIN ANALYZE.
Returns: A success message or an error message.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
analyze | No | ||
query | Yes |