Analyze
From slow query to concrete fix
Run EXPLAIN ANALYZE in a notebook cell to open an interactive plan tree, a flame graph, and a diff between runs. Index recommendations are based on your schema.
Pro, Sponsor
How you use it
- Run EXPLAIN from a notebook cell
The Explain Analyze CodeLens appends a plan cell. Read the text plan for a quick scan, or the Visual tab for structure.
EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM orders WHERE created_at >= NOW() - INTERVAL '30 days';
- Open Plan Studio on the result
The tree and flame graph highlight sequential scans and nested loops. Compare two runs side by side.
- Ask AI to optimize with schema context
The Optimize CodeLens or the assistant suggests an index, with the expected impact.
CREATE INDEX CONCURRENTLY idx_orders_created_at ON orders (created_at DESC);
- Chart a result set
Draw bar, line or pie charts from query output. The Analyst tab adds pivot and histogram, with an optional Send to Assistant.
Key facts
- Plan: Pro, Sponsor
- Visual EXPLAIN
- Plan diff between runs
- Flame graph
- Index suggestions
- Charts and an Analyst tab on result sets