Simon Willison’s Weblog

Subscribe

Wednesday, 29th July 2020

Some SQL Tricks of an Application DBA (via) This post taught me so many PostgreSQL tricks that I hadn’t seen before. Did you know you can start a transaction, drop an index, run explain and then rollback the transaction (cancelling the index drop) to see what explain would look like without that index? Among other things I also learned what the “correlation” database statistic does: it’s a measure of how close-to-sorted the values in a specific column are, which helps PostgreSQL decide if it should do an index scan or a bitmap scan when making use of an index.

# 7:04 pm / postgresql, sql

TIL SQLite BLOB literals — I wanted to construct a string of SQL that would return a blob value:
Release datasette-media 0.5 — Datasette plugin for serving media based on a SQL query
Tuesday, 28th July 2020
Thursday, 30th July 2020