datasette-explain by simonw

18 downloads this week        Star

README source code


PyPI Changelog Tests License

Explain SQL queries executed using Datasette


Install this plugin in the same environment as Datasette.

datasette install datasette-explain

This plugin requires a Datasette 1.0 alpha or higher.


The plugin adds JavaScript to the query editor page which will constantly update the page with information gained from running EXPLAIN QUERY PLAN queries against the entered SQL.

This may result in an error message, or it may show the query plan along with any tables used by the query.


To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-explain
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests: