CoolCode.caReading a plan

QUERY PLAN LAB · LOCAL BROWSER TOOL

Make the query
plan visible.

Follow the tables, indexes and estimates behind your query. Compare two plans to see what the optimizer changed.

MySQL & MariaDB JSONNo database connectionYour plans stay in this browser

01 / INPUT

Bring your execution plan

Run EXPLAIN FORMAT=JSON SELECT … in your database and paste its JSON output. Add a second plan to compare. The example is hand-written to demonstrate the interface.

Maximum 2 MB per plan

Paste a plan or explore the illustrative comparison.

METHOD & LIMITS

A plan is a hypothesis. Measure it.

Read access paths

ALL means a full table scan; index means a full index scan. Compare the chosen key with possible keys, filter estimates and table size before deciding whether an index is missing.

Keep costs comparable

Optimizer cost is not milliseconds. Root cost is shown separately and never summed with child costs. Compare the same query, engine version, data and settings. MySQL and MariaDB costs are not interchangeable.

Separate actual measurements

MariaDB ANALYZE FORMAT=JSON may include r_rows and r_loops; these are displayed separately. ANALYZE executes the query. MySQL TREE output and JSON format version 2 are not supported here.

Inputs are held only in memory. No plan, SQL or file is uploaded or saved automatically. CoolCode's aggregate visit counter runs independently and does not receive your plan. Downloaded reports contain your plan details.

References: MySQL EXPLAIN · MariaDB JSON plans

Related tools: Rack Recipes · Rack Expiry