View Types
Five visualization types, one parser, one analysis engine. Pick the view that answers your question.
Quick comparison
| View | Best for | Command |
|---|---|---|
| Flame graph | Full execution hierarchy, time distribution | myflames explain.json |
| Bar chart | Finding the slowest individual operations | --type bargraph |
| Treemap | Comparing relative cost at a glance | --type treemap |
| Diagram | Join order & access paths (Visual Explain) | --type diagram |
| Execution tree | Collapsible per-subtree with self/total time | --type tree |
Not sure? Run myflames guide for a quick interactive picker.
Detailed view guide
Flame Graph (default)
Full hierarchyTime distributionDrill-downThe default view. Each horizontal bar represents an operation in the query plan. Width is proportional to execution time. Parent operations stack above their children. Click to zoom into a subtree, Ctrl+F to search.
When to use: You want to see the entire query execution at once and quickly spot which branch consumed the most time. Great for complex multi-join queries where you need to understand the nesting.
Options: --colors hot|mem|io|red|green|blue, --inverted (icicle graph), --height N (frame height).
Bar Chart
Slowest firstSelf time focusQuick triageOperations sorted by self-time (excluding children). The bar chart immediately answers "which single operation took the longest?" without requiring you to navigate a hierarchy.
When to use: You already know the query is slow and want to jump straight to the bottleneck. Best for quick triage before diving into the flame graph for context.
Treemap
Visual weightProportional costPresentationsNested rectangles where area is proportional to total execution time. Operations that cost more visually dominate. Click any rectangle to zoom in, click the breadcrumb to zoom out.
When to use: You want a spatial feel for "where did the time go?" at a glance. Good for presentations and reports where a non-DBA audience needs to understand the cost breakdown.
Diagram (Visual Explain)
Join orderAccess pathsMySQL Workbench styleA flow diagram inspired by MySQL Workbench's Visual Explain. Tables are shown as nodes with their access type (ALL, ref, range, etc.), and join operations are shown as connectors. Each node shows actual rows, loops, and cost.
When to use: You want to understand the join order (which table is the driving table?), which access paths are used (full scan vs. index lookup), and how data flows between operations. Best for multi-table joins.
Interactions: +/− zoom, drag-to-pan, double-click to reset. Click a node to pin its details strip.
Execution Tree
Expand/collapseSelf vs total timeSubquery isolationA collapsible tree where each node shows both self-time and total time. Expand only the branches you care about. Useful for deeply nested plans where the flame graph gets too tall.
When to use: You have a complex plan with subqueries, CTEs, or deeply nested joins, and want to focus on one subtree at a time. The "Expand All" / "Collapse All" buttons let you toggle between overview and detail.
Common to all views
- Query Analysis panel — every view includes optimizer feature detection, warnings (full table scans, hash joins, temp tables, filesorts), and concrete tuning suggestions with copy-paste-able SQL.
- HTML output — use
--output report.htmlfor self-contained interactive files with all features enabled. - JSON sidecar — every
--outputalso writes a.jsonsidecar with structured plan data for CI/CD or AI agents. - Search — Ctrl+F regex search works in all views.