get_index_advisor_recommendations
Analyzes a SQL++ query and provides recommendations for optimal indexes, including current, recommended secondary, and covering indexes to improve query performance.
Instructions
Get index recommendations from Couchbase Index Advisor for a given SQL++ query.
The Index Advisor analyzes the query and provides recommendations for optimal indexes. This tool works with SELECT, UPDATE, DELETE, or MERGE queries. The queries will be run on the specified scope in the specified bucket.
Returns a dictionary with:
current_used_indexes: Array of currently used indexes (if any)
recommended_indexes: Array of recommended secondary indexes (if any)
recommended_covering_indexes: Array of recommended covering indexes (if any)
Each index object contains:
index: The CREATE INDEX SQL++ command
statements: Array of statement objects with the query and run count
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket_name | Yes | ||
| scope_name | Yes | ||
| query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||