Summary
Query runs 4 operators; returns 100 rows in 0.19 ms. No warnings.
- Total time
- 191 µs
- Rows returned
- 100
- Rows examined
- 29
- Operators
- 4
No blocking issues found
myflames found nothing to fix in this plan — it looks healthy.
SQL
select u.name AS name,o.total AS total
from testdb.users u
join testdb.orders o
where ((o.user_id = u.id) and (u.country = 'US'))
limit 100
Execution plan (workbench)
Click a plan operator to inspect details.
Agent-ready · token savings
Feeding this plan to an AI as the myflames digest instead of raw EXPLAIN JSON cuts the prompt by 6.2× (83.8% fewer tokens).
- Raw plan
- 764 tokens
- myflames digest
- 124 tokens
- Saved
- 640 tokens
- Per 1,000 queries
- ~$1.92 saved
Estimate (heuristic estimate (offline)). Prices as of 2026-05-26 (Sonnet 4.6 input). Generate the digest with myflames digest.
myteach — interactive algorithm catalog
Every operator shown above has a hands-on lesson with a cost-model slider and an animated walk-through. The catalog is the central index — bookmark it once, revisit per query:
Raw sidecar (JSON)
{
"$schema": "https://myflames.dev/schemas/sidecar-v1.json",
"schema_version": "1.3",
"generated_at": "2026-10-15T19:53:26Z",
"myflames_version": "2.3.0",
"source": {
"type": "file"
},
"plan_summary": {
"total_time_ms": 0.191,
"rows_sent": 100,
"rows_examined_estimate": 29,
"operator_count": 4,
"max_depth": 3
},
"optimizer_switches": [
{
"name": "index_condition_pushdown",
"value": "on",
"explanation": "Parts of the WHERE clause are evaluated inside the storage engine using index columns before fetching the full row — reduces rows handed to the server layer.",
"node_labels": [
"Index lookup [users.idx_country]"
]
}
],
"warnings": [],
"suggestions": [],
"executive_summary": "Query runs 4 operators; returns 100 rows in 0.19 ms. No warnings.",
"plan_tree": {
"node_id": "n:983802d67230",
"short_label": "Limit: 100 rows",
"folded_label": "LIMIT starts=1 rows=100",
"children": [
{
"node_id": "n:4c603f6ff3a2",
"short_label": "Nested loop inner join",
"folded_label": "NESTED LOOP INNER starts=1 rows=100",
"children": [
{
"node_id": "n:c2b715d94b7a",
"short_label": "Index lookup [users.idx_country]",
"folded_label": "INDEX LOOKUP [users.idx_country] starts=1 rows=25",
"children": []
},
{
"node_id": "n:e946d0baae67",
"short_label": "Index lookup [orders.idx_user]",
"folded_label": "INDEX LOOKUP [orders.idx_user] starts=25 rows=4",
"children": []
}
]
}
]
},
"query": {
"raw": "/* select#1 */ select `u`.`name` AS `name`,`o`.`total` AS `total` from `testdb`.`users` `u` join `testdb`.`orders` `o` where ((`o`.`user_id` = `u`.`id`) and (`u`.`country` = 'US')) limit 100",
"beautified": "select u.name AS name,o.total AS total\nfrom testdb.users u\n join testdb.orders o\nwhere ((o.user_id = u.id) and (u.country = 'US'))\nlimit 100"
},
"teach_hooks": [
{
"lesson": "nested_loop",
"match": {
"folded_label": "NESTED LOOP INNER starts=1 rows=100",
"short_label": "Nested loop inner join"
},
"controls": {
"outer_rows": 25,
"inner_rows": 100,
"row_size": 200
},
"note": "Nested loop inner join",
"query_sql": "/* select#1 */ select `u`.`name` AS `name`,`o`.`total` AS `total` from `testdb`.`users` `u` join `testdb`.`orders` `o` where ((`o`.`user_id` = `u`.`id`) and (`u`.`country` = 'US')) limit 100"
},
{
"lesson": "non_unique_lookup",
"match": {
"folded_label": "INDEX LOOKUP [users.idx_country] starts=1 rows=25",
"short_label": "Index lookup [users.idx_country]"
},
"controls": {
"rows": 25,
"selectivity": 4.2,
"covering": false
},
"note": "Index lookup on u using idx_country (country='US'), with index condition: (u.country = 'US') (users)",
"query_sql": "/* select#1 */ select `u`.`name` AS `name`,`o`.`total` AS `total` from `testdb`.`users` `u` join `testdb`.`orders` `o` where ((`o`.`user_id` = `u`.`id`) and (`u`.`country` = 'US')) limit 100"
},
{
"lesson": "non_unique_lookup",
"match": {
"folded_label": "INDEX LOOKUP [orders.idx_user] starts=25 rows=4",
"short_label": "Index lookup [orders.idx_user]"
},
"controls": {
"rows": 100,
"selectivity": 40.0,
"covering": false
},
"note": "Index lookup on o using idx_user (user_id=u.id) (orders)",
"query_sql": "/* select#1 */ select `u`.`name` AS `name`,`o`.`total` AS `total` from `testdb`.`users` `u` join `testdb`.`orders` `o` where ((`o`.`user_id` = `u`.`id`) and (`u`.`country` = 'US')) limit 100"
}
],
"operator_complexities": [
{
"node_id": "n:4c603f6ff3a2",
"folded_label": "NESTED LOOP INNER starts=1 rows=100",
"short_label": "Nested loop inner join",
"complexity": {
"big_o": "O(n · log m)",
"short": "n · log m",
"severity": "medium",
"rationale": "Indexed nested loop: each outer row probes the inner table via an index descent.",
"confidence": "exact",
"learn_more": "nested_loop_join"
}
},
{
"node_id": "n:c2b715d94b7a",
"folded_label": "INDEX LOOKUP [users.idx_country] starts=1 rows=25",
"short_label": "Index lookup [users.idx_country]",
"complexity": {
"big_o": "O(log n + k)",
"short": "log n + k",
"severity": "good",
"rationale": "Index lookup (ref): one B+tree descent then a sequential walk over k matching index entries. k = matching rows for the indexed predicate.",
"confidence": "exact",
"learn_more": "index_lookup"
}
},
{
"node_id": "n:e946d0baae67",
"folded_label": "INDEX LOOKUP [orders.idx_user] starts=25 rows=4",
"short_label": "Index lookup [orders.idx_user]",
"complexity": {
"big_o": "O(log n + k)",
"short": "log n + k",
"severity": "good",
"rationale": "Index lookup (ref): one B+tree descent then a sequential walk over k matching index entries. k = matching rows for the indexed predicate.",
"confidence": "exact",
"learn_more": "index_lookup"
}
}
]
}