# SQLite Query Explainer

Run SQL against a SQLite database and see what the query planner is really doing: the tool executes your query, then runs `EXPLAIN QUERY PLAN` and `EXPLAIN` against it and annotates every line of their output with a plain-English description. Powered by Python's `sqlite3` module running in your browser via Pyodide — nothing you load or type leaves your machine.

## 1. Choose a database

or

Database schema

## 2. Run a query

Example queries:

Ctrl/Cmd + Enter

## Results

## Query plan — `EXPLAIN QUERY PLAN`

The high-level strategy SQLite chose for this query. Indented items run inside their parent; sibling loops form nested joins, with each row from an outer loop driving a full pass of the loops below it.

## Bytecode — `EXPLAIN`

SQLite compiles every statement into a program for its virtual machine (the VDBE); this is that program, one instruction per row. The | bars mark loop bodies. Instruction numbers are links — click one to jump to it, and the ↖ from n badge on an instruction shows which other instructions jump to it. Hover a register like `r[3]` or a cursor to highlight everywhere else it is used.

Show explanations