Summary

Query scans 1 table; returns 3,000 rows in 0.44 ms. Main finding: full scan of users (3,000 rows).

Total time
441 µs
Rows returned
3.00K
Rows examined
3.00K
Operators
1
Fix first

Primary recommendation

Add indexes on filter/join columns to avoid full table scans

Why does this help?

An index turns a full-table scan into a direct lookup — MySQL jumps straight to the matching rows instead of reading every row and discarding the ones that don't match. For joins, the benefit compounds: a nested loop over N outer rows that had to scan the inner table becomes N fast lookups.

SQL

select testdb.users.id AS id,testdb.users.name AS name,testdb.users.email AS email,testdb.users.country AS country,testdb.users.created_at AS created_at
from testdb.users

Execution plan (flamegraph)

Click a plan operator to inspect details.

MySQL Query Plan Reset Zoom Search ic TABLE SCAN [users] starts=1 rows=3000 (441 µs, 100.00%) Table: testdb.users Access: table Rows: 3000 actual (3000 estimated) Time: 0.441 ms (last row) Cost: 303.50 TABLE SCAN [users] starts=1 rows=3000

Warnings (1)

  1. WARN

    Full table scan: users (3000 rows)

    Labeled: Table scan [users]

Suggestions (1)

  1. HIGH

    Add indexes on filter/join columns to avoid full table scans

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:

Open the full catalog →

Raw sidecar (JSON)

{
  "$schema": "https://myflames.dev/schemas/sidecar-v1.json",
  "schema_version": "1.3",
  "generated_at": "2026-04-25T12:51:24Z",
  "myflames_version": "1.5.0",
  "source": {
    "type": "file"
  },
  "plan_summary": {
    "total_time_ms": 0.441,
    "rows_sent": 3000,
    "rows_examined_estimate": 3000,
    "operator_count": 1,
    "max_depth": 1
  },
  "optimizer_switches": [],
  "warnings": [
    {
      "severity": "warn",
      "category": "full_scan",
      "text": "Full table scan: users (3000 rows)",
      "source": "plan",
      "node_labels": [
        "Table scan [users]"
      ]
    }
  ],
  "suggestions": [
    {
      "severity": "high",
      "category": "index",
      "action": "Add indexes on filter/join columns to avoid full table scans",
      "source": "plan"
    }
  ],
  "executive_summary": "Query scans 1 table; returns 3,000 rows in 0.44 ms. Main finding: full scan of users (3,000 rows).",
  "plan_tree": {
    "node_id": "n:2618219f4438",
    "short_label": "Table scan [users]",
    "folded_label": "TABLE SCAN [users] starts=1 rows=3000",
    "children": []
  },
  "query": {
    "raw": "/* select#1 */ select `testdb`.`users`.`id` AS `id`,`testdb`.`users`.`name` AS `name`,`testdb`.`users`.`email` AS `email`,`testdb`.`users`.`country` AS `country`,`testdb`.`users`.`created_at` AS `created_at` from `testdb`.`users`",
    "beautified": "select testdb.users.id AS id,testdb.users.name AS name,testdb.users.email AS email,testdb.users.country AS country,testdb.users.created_at AS created_at\nfrom testdb.users"
  },
  "primary_action": {
    "ref": "suggestions[0]"
  },
  "teach_hooks": [
    {
      "lesson": "full_scan",
      "match": {
        "folded_label": "TABLE SCAN [users] starts=1 rows=3000",
        "short_label": "Table scan [users]"
      },
      "controls": {
        "rows": 3000,
        "row_size": 200,
        "selectivity": 100.0
      },
      "note": "Table scan on users (users)",
      "query_sql": "/* select#1 */ select `testdb`.`users`.`id` AS `id`,`testdb`.`users`.`name` AS `name`,`testdb`.`users`.`email` AS `email`,`testdb`.`users`.`country` AS `country`,`testdb`.`users`.`created_at` AS `created_at` from `testdb`.`users`"
    }
  ],
  "operator_complexities": [
    {
      "node_id": "n:2618219f4438",
      "folded_label": "TABLE SCAN [users] starts=1 rows=3000",
      "short_label": "Table scan [users]",
      "complexity": {
        "big_o": "O(n)",
        "short": "n",
        "severity": "medium",
        "rationale": "Full table scan: the storage engine returns every row; cost scales with the table size.",
        "confidence": "exact",
        "learn_more": "full_table_scan"
      }
    }
  ]
}

Teach: Operator deep dive