Relay Assistant
Query Plan Explanations
Use AI to understand and optimize your query execution plans.
Explain with AI
After running EXPLAIN ANALYZE on a query, you can use AI to get a plain-language breakdown of the execution plan.
- Run your query with Query Plan mode enabled
- Switch to the Analysis tab
- Click Explain with AI
The AI will analyze the execution plan and explain:
- What each node in the plan tree does
- Why certain nodes are slow or costly
- Which indexes are being used (or missing)
- Suggestions for improving query performance
What Gets Sent
When you use Explain with AI, the following context is sent to your configured provider:
- The query plan output (EXPLAIN ANALYZE results)
- The original SQL query
- Relevant table and index information
Your actual row data is never sent — only the plan metadata and schema context.