Skip to main content

Explain SQL queries executed using Datasette

Project description

datasette-explain

PyPI Changelog Tests License

Explain SQL queries executed using Datasette

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-explain

Usage

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.

Demo

You can see this plugin in action on datasette.simonwillison.net.

Demo of this plugin - a SQL query shows the explain plan as well as the three tables that were used in the query (their names and columns)

Development

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:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-explain-0.2.1.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

datasette_explain-0.2.1-py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page