explain_query
Analyze and optimize CockroachDB SQL queries by generating statement plans. Execute EXPLAIN ANALYZE to obtain execution statistics and improve query performance.
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 |