This service lets you analyze, visualize and share DuckDB Query Plans. It will compute and highlight the most important information to make them easier to understand.
It is brought to you by Database Systems Research Group @ University of Tübingen.
This project is based on Postgres Explain Visualizer 2 (pev2) by Dalibo.
To get a JSON execution plan you can use:
EXPLAIN (FORMAT JSON) [your-query-here] or to have it more detailed
EXPLAIN (ANALYZE, FORMAT JSON) [your-query-here].
To get the most out of it, we recommend generating the plan using the following lines in any terminal running
the DuckDB CLI:
PRAGMA enable_profiling = 'json';
PRAGMA profiling_output = '/path/to/file.json'; (optional)
[your-query-here]
Then just drag & drop your JSON file or copy its content into the PLAN section.
You can add a name for the plan (you don't have to).
Click Submit.
It is recommend submitting a (decently formatted) SQL query that generated the plan.
You can send plans using HTTP POST to https://db.cs.uni-tuebingen.de/explain/new.
The request parameters to send are title, plan and optionaly query.
Here's an example using a HTML form:
<form action="https://db.cs.uni-tuebingen.de/explain/new" method="POST">
<input type="text" name="title" value="A title for the plan"/>
<textarea name="plan" rows="10" cols="50">
{ "name": "GENERATE_SERIES ", "children": [], "extra_info": { "Function": "GENERATE_SERIES", "Estimated Cardinality": "9" } }
</textarea>
<textarea name="query" cols="50"></textarea>
<button type="submit">Submit</button>
</form>
Here's an example using cURL:
$ curl -Ls -w %{url_effective} -d '{"plan":"{ "name": "GENERATE_SERIES ", "children": [], "extra_info": { "Function": "GENERATE_SERIES", "Estimated Cardinality": "9" } }", "title": "My simple plan", "query": "The corresponding query"}' -H "Content-Type: application/json" -X POST https://db.cs.uni-tuebingen.de/explain/new -o /dev/null
This application uses the duckdb-explain-visualizer JS library to analyze and display the plan.
Please report bugs on GitHub.
The plans you send are stored in the database. This allows you to easily share a link to anyone.
It is recommended not to send any critical or sensitive information.
Plans are meant to be stored permanently (with no waranty) unless you delete them yourself.
You can delete the saved plans using the list shown in the home page. Make sure you're using the same browser.