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 |
| Visual Explain | Join semantics, operator colors, row-volume arrows, and smooth pan/zoom | --type workbench (diagram alias) |
| 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.
Visual Explain
Join orderAccess pathsMySQL Workbench styleA downward-flow plan inspired by MySQL Workbench, merging the former Diagram and Workbench views. Large Venn symbols highlight the reported join type: left joins shade the whole left circle, inner joins shade the overlap. Operator colors and row-volume arrows remain distinct from measured time.
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: Smooth proportional wheel zoom, +/− buttons, drag-to-pan, and double-click to fit. Click a node to inspect details.
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.
Not rendering for a human? myflames also projects the same analysis as a
token-cheap text digest, ranked advise findings, a
check exit-code gate, and an MCP server — see the
Agent & CI subcommands.