Coding with AI

datasette-explain version 0.2.2

Version 0.2.2 of the datasette-explain plugin adds support for displaying SQLite explain plans on read-only stored-query pages in Datasette. The update was prompted by Simon Willison upgrading his public instance to Datasette 1.0a40, which exposed the limitation. Explain plans help developers understand query execution, spot missing indexes, and debug slow queries—now available even without a writable setup.

If you work with Datasette and want to understand how SQLite executes your queries, this release is for you. The datasette-explain plugin just got an update to version 0.2.2, and it brings a welcome improvement: explain plans now display correctly on stored-query pages, even when those pages are read-only.

datasette-explain version 0.2.2

What changed in this release

The headline feature of 0.2.2 is support for explain plans on stored-query pages that are read-only. Previously, if you visited a page showing a saved query in a read-only context, the plugin couldn't generate the explanation of how SQLite would execute that query. Now it can, which means you get visibility into query behavior regardless of whether the page allows writes.

That might sound like a small fix, but for anyone debugging slow or surprising queries through a Datasette instance, it removes a real gap. You no longer need a writable setup to inspect what SQLite is doing under the hood.

Why the update happened now

The release was prompted by an infrastructure change. Simon Willison upgraded his public instance at datasette.simonwillison.net to Datasette 1.0a40, an alpha build of the upcoming 1.0 release. Running the site on that newer version surfaced the limitation with read-only stored queries, which motivated shipping the new plugin version.

This is a good example of how maintaining a live, publicly accessible Datasette instance can act as a real-world test bed. Issues that only appear under certain configurations — like read-only query pages — tend to show up quickly when you actually run the software on real data for real visitors.

datasette-explain version 0.2.2

About the plugin

For those unfamiliar with it, datasette-explain is a Datasette plugin that lets you view SQLite's explain plans. An explain plan shows the steps the database engine intends to take to run a query — which tables it scans, which indexes it uses, and in what order operations happen. Developers use these plans to spot missing indexes or inefficient query patterns.

The plugin is useful whether you're tuning your own queries or trying to understand why a particular endpoint on a Datasette instance feels slow. With 0.2.2, that capability extends cleanly to stored queries in read-only contexts, which covers many public-facing Datasette deployments.

If you already have the plugin installed, upgrading is straightforward — pull down version 0.2.2 and the stored-query support will be available on pages running against a compatible Datasette build. If you're new to the plugin, it's a lightweight addition worth trying, especially if you spend time writing SQL against SQLite databases through Datasette.

A note on versions

Keep in mind that Datasette 1.0a40 is an alpha release, so behavior may change before 1.0 is final. If you're running a production Datasette instance on a stable version, check that the plugin version you install matches your Datasette build's expectations. The plugin's repository page is the best place to confirm compatibility details before upgrading.

Wrapping up

Version 0.2.2 of datasette-explain is a focused release: it closes a gap in read-only stored-query pages and was driven by the practical need to keep a public Datasette instance running smoothly on the 1.0 alpha line. If explain plans are part of your SQLite workflow, this update is worth grabbing.

Tags: sqlite, datasette, release notes, developer tools

Meta description: datasette-explain 0.2.2 now shows explain plans on read-only stored-query pages, inspired by an upgrade to Datasette 1.0a40. Here's what changed.

Comments (0)

  1. No comments yet. Be the first to share what worked for you.

Leave a comment

Comments are reviewed before they appear. Your email address is not published.