SQLite Tags Benchmark: Comparing 5 Tagging Strategies
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
Developers tagging data in SQLite now have measured evidence that indexed lookup tables beat JSON and LIKE approaches by wide margins.
Simon Willison ran a test comparing five ways to store and search 'tags', labels attached to records, in SQLite, a popular free database. Using 100,000 rows and 100 possible tags, he found that traditional link tables and indexed lookup tables answered queries in under 1.5 milliseconds, while storing tags as raw JSON or searching text with pattern matching was far slower. Anyone building apps with tagged content can use these results directly.
This is practical engineering guidance, not product news: a developer benchmarking five SQLite tagging strategies on 100,000 rows found indexed approaches, materialized lookup tables on JSON and classic many-to-many tables, complete single-tag queries in under 1.5 milliseconds. Simpler JSON-based designs carry a steep performance penalty. Teams choosing a tagging schema can avoid a costly redesign by following these trade-offs between speed, storage and complexity.
A micro-benchmark (run via Claude Code) compared five SQLite tagging strategies on 100,000 rows, 100 tags, averaging 6.5 tags per row. Classic many-to-many tables and materialized lookup tables on JSON were fastest, handling single-tag queries in under 1.5 ms; FTS5 placed a close second. Full-table scans using LIKE performed better than expected, while JSON arrays with json_each() were much slower. Caveat: small synthetic scale and single-tag queries only.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.
Intel One Mono: a monospaced font designed with low-vision developers
Developers with low vision or eye fatigue can read code more clearly, reducing errors and improving productivity.