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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file datasette-explain-0.2.1.tar.gz.

File metadata

  • Download URL: datasette-explain-0.2.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for datasette-explain-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fcb0dfd852b08f535335de35d9f4ec90db28ce2e1052e63e0dc658a668bf602d
MD5 1a5d33b104bcba5c6bcf11d3aa220c83
BLAKE2b-256 75eae02f3c59f3bdf7db049216748d651db51290ce298494482a7d035976de39

See more details on using hashes here.

File details

Details for the file datasette_explain-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_explain-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65e7ef571df083206e8e33237dd7e6433715c2da2e457c6a25989cdabc86446e
MD5 c84eb58e6ca1f92fb54c4fc87d4dea96
BLAKE2b-256 6e4d7e8559d02ffcf7c83421a8044917a129c8a7c85de71be009a4b74d85d971

See more details on using hashes here.

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