r/sqlite • • Oct 15 '26

Letos 4.0.4 released

10 Upvotes

It brings few important bugfixes and SQLite update to 3.54.0. Fixes for:

  • Renaming columns referenced by views and constraints,
  • Queries involving attached databases,
  • SQL Editor drag-and-drop operations,
  • Import errors now identify the affected row,
  • Double-clicking databases can optionally expand or collapse them
  • Syntax highlighting,
  • Dark themes,
  • Crashes when renaming views

Pawel, thank you so much for all the time and effort you put into our favorite SQLite GUI.


r/sqlite • • Oct 15 '26

MariaDB Foundation: Reproducing and Validating MDEV‑37992 with TAF

Post image
6 Upvotes

r/sqlite • • Oct 11 '26

SeedForge — generate FK-aware seed data straight from your Prisma schema, inside VS Code

3 Upvotes
Every time I added a table to a Prisma project I ended up hand-writing the
same throwaway seed data — fake names, emails, enum values I'd forget to vary
so every row came out identical. Small annoyance, but it showed up on every
project.


So I built a little VS Code extension to kill that step. Point it at your
`schema.prisma`, pick a model, pick a row count, pick a format — it reads the
schema and generates realistic, type-correct rows (emails look like emails,
enums actually vary, optionals are sometimes null), then writes them out as
JSON, SQL `INSERT`s, or CSV.


Things I deliberately kept simple:
- Runs entirely locally. No account, no sign-in, no telemetry, no network calls.
- Hand-rolled schema parser, so it's instant and has no heavy deps.


Honest about the limits: it only does Prisma right now, and the free version
does one table at a time. I'm working on generating linked tables with
correct foreign keys next (so a `Post` and its `User` come out already wired
together).


It's free on the Marketplace if you want to try it:
https://marketplace.visualstudio.com/items?itemName=Avers.seedforge
(also on Open VSX for Cursor/VSCodium folks:
https://open-vsx.org/extension/Avers/seedforge)


Mostly I'd love feedback — especially schemas that break the parser, or what
you'd actually want from "seed data" that generic faker tools miss. Built it
solo, so real-world edge cases are gold.

r/sqlite • • Oct 11 '26

Best Sqlite implementation of Agent Memory?

12 Upvotes

I want to use sqlite as a memory store for an agent.

- needs to store, index and retrieve text fragments
- vector retrieval
- ideally also FTS

I am currently looking at this approach
https://github.com/sqliteai/sqlite-memory

which is fine. combines vector similarity + FTS5

What fantastic approaches am I missing?

----- EDIT ----------

Ok so there wasn't many new suggestions.
I ended up not using sqlite-memory because their licencing was a bit fuzzy. It basically requires a licence to use commercially so it's out. Pretty stoopid if you ask me. If you guys have any great ideas, I'm still open to suggestion.

-------------------------


r/sqlite • • Oct 10 '26

SQLite 3.54.0 released

65 Upvotes

Release log: https://sqlite.org/releaselog/3_54_0.html

Some items that stood out to me:

  • About 4% faster on speedtest1, and about 7.5% faster than 3.51.0 from a year ago
  • CLI now shows column headers by default even when a query returns no rows
  • .diskused is now built into the CLI, and sqlite3_analyzer is deprecated
  • New %j and %J conversions in printf() and format() for JSON string literals
  • UPDATE skips expression indexes when the indexed value is unchanged

r/sqlite • • Oct 10 '26

Need some help on SQLite disaster recovery with expiring data. Been stuck on this for two days :')

10 Upvotes

I have a small Python application running on AWS Lightsail that monitors auction listings and publishes the findings to a private Google Sheet. It has background workers running continuously and an SQLite database that's grown to about 2.2 GB, plus roughly 1.2 GB of separately stored source files. The current server is a $12/month Lightsail instance with 2 GB of RAM and 2 vCPUs. I'm trying to keep the total monthly infrastructure and service costs under $60.

I've been working on getting disaster recovery set up properly for the last couple of days and keep running into issues.

The database contains permanent information like listing identities, user notes, processing history and publication records. It also contains temporary auction content, including historical listing JSON and descriptions, that has separate storage and usage expiration requirements.

The original backup system encrypted the operational database and uploaded snapshots to Cloudflare R2. The issue was that temporary source content was bundled together with everything else. The resulting backup inherited the earliest expiration deadline of the content inside it. By the time a full backup finished uploading and could go through an independent restoration test, that deadline had already passed. We repeatedly ended up with uploaded backups that couldn't qualify as valid current recovery points.

We've spent probably two days iterating on a replacement. The current implementation separates durable records from temporary source evidence, stores the evidence as individually encrypted objects with their own expiration deadlines and uses Cloudflare Workers with Durable Objects to manage cleanup independently of the main AWS server.

Quite a few isolated tests have passed, including encryption and restoration tests, but we still haven't successfully migrated the entire production database and demonstrated a complete off-host recovery using the replacement system.

The migration measurements have also been painfully slow. One attempt processed around 53,000 historical listing versions before hitting its time limit. Another reached about 66,000 before stopping. The current Lightsail instance has effectively exhausted its CPU burst capacity, and the existing database maintenance routines have caused SQLITE_BUSY errors and delayed worker progress. The actual application is still running, but recovery remains unverified.

We're considering upgrading to a $42/month compute-optimized Lightsail instance with dedicated CPU performance. The measurements suggest CPU throttling is a bigger issue than memory consumption, although we haven't finished benchmarking the replacement hardware.

I'm rather frustrated because every time we fix something, another issue comes up (e.g., retention handling, database migration, backup consistency, recovery verification, blah blah). There's now quite a bit of additional code devoted to managing all of this, and we still haven't reached a deployable recovery system.

The requirement I have in place is that the permanent application state needs to survive a complete server failure. Also, temporary source evidence has to stop being accessible when its authorization expires, and cleanup needs to happen automatically even if the main server is unavailable. I also need to be able to restore everything necessary on a replacement server without manually rebuilding the application.

To anyone more experienced, how would you structure the database and temporary storage so that backups remain recoverable after individual source records expire? What would you use for consistent SQLite backups to S3-compatible storage while background workers are actively writing? How would you verify that a backup can actually restore the entire application without requiring an elaborate custom recovery system?

I'm also interested in whether the hardware limitations are contributing enough to justify upgrading before continuing with the migration.

I've already spent a considerable amount of time rewriting and testing this, so I'd appreciate advice on wtf to do next 😔 I'm fine changing the architecture if there's a better approach that handles these requirements reliably


r/sqlite • • Oct 10 '26

Should I expect write performance over different database files on separate threads to scale?

5 Upvotes

Hi

I am experimenting with sqlite on a Macbok Pro M4 - 10 cores machine. I have a pthreads multithreaded program and i am trying to write lots of data to different databases (separate database connections) and (one database file per thread) and they are DIFFERENT files

I have THREADSAFE mode set to 2 (multithreaded) and i open the files with NOMUTEX flag.

Now i have read that the M4 Macbook Pro has a soldered SSD. And it has similar performance to nvme but it is not nvme

I get around 10000 transactions per second in total across all threads.

I tried synchronous=off and that boosts performance to 300000 transactions per second

Increasing the number of items inserted per transaction scales. But the number of transactions doesnt

I feel that IO is being serialised.

Some parts of web seem to suggest it is serialised. But i thought ssds can run things in parallel.

Does anybody know anything about parallel IO or if i need to enable it on macos?

I havent tried it on Linux or Windows

Would you expect transactions to scale by number of threads?

I have read about iokit but i have no knowledge of how to use it or Grand Central Dispatch


r/sqlite • • Oct 10 '26

Guys I rewrote SQLite 3 in Rust with great help from Claude and GitHub Copilot. Thoughts !!!

Thumbnail github.com
0 Upvotes

r/sqlite • • Oct 09 '26

Guys I made this to support legacy docs any opinions

Thumbnail github.com
2 Upvotes

r/sqlite • • Oct 07 '26

built a lightweight open-source analytics tool in PHP + SQLite because Node.js should NOT be the default option

5 Upvotes

hi everyone,

5 days ago i asked here why every self-hosted analytics tool needs Node.js/Docker, and said i might build a PHP + SQLite one. so, i did.

it's called Minilytics. it is open-source and runs on any PHP 8 host with no Node, no Docker and no database server (Sqlite by default, but you can use MySQL or MariaDB). it has sessions, custom events, funnels, a cookieless mode, and an importer from Umami and others importers are planed! (this allowed me to get my old history back).

it's a v1 from a solo builder, its MIT licensed, with a live demo: https://minilytics.axthauvin.fr/

i'd like this to become the go-to lightweight analytics for indie devs, side projects, and any site that just needs simple, private stats, so tell me what's missing for you to use it on a real site !

thanks to everyone who pushed me to build this and i hope it will be useful to some of you.


r/sqlite • • Oct 06 '26

DoltLite Beta! Version Controlled SQLite now in Beta.

Post image
3 Upvotes

r/sqlite • • Oct 05 '26

Pure GO SQLite-compatible database. 75× C SQLite & 200× Turso.

31 Upvotes

I've been building musql (pronounced "muscle"), a SQLite-compatible database written from scratch.

Repo: https://github.com/samyfodil/musql

It has a `database/sql` driver that registers as `sqlite`, so switching from another SQLite driver is usually just changing the import line. It uses its own storage format (`.musq`), with columns stored contiguously and an append-only delta for writes. `musql-convert` converts existing SQLite files in and out, in both directions.

SQL compiles to VDBE bytecode, the same design as C SQLite. A JIT turns hot paths into native code on amd64 and arm64 (Linux, macOS and Windows).

There's also `musqld`, a server that speaks Turso's Hrana protocol. `@libsql/client` and `libsql-client-go` connect unchanged, and there's a 5 MB Docker image. Replication supports CRDT or leader mode; you supply the network.

For performance, these are 100k-row read workloads, averaged over an amd64 and an arm64 machine:

  • filtered `count(*)`: ~75x faster than C SQLite, ~210x faster than Turso
  • sum over a filter: ~8x faster than C SQLite
  • grouped aggregate: ~2.3x faster; `ORDER BY ... LIMIT`: ~2.4x faster

It also runs Doom. The same VM that runs SQL runs unmodified doomgeneric, compiled C -> LLVM IR -> VDBE bytecode. On an Intel i9 it gets ~38 fps on the bytecode interpreter and ~96 fps with the JIT. The idea came from Turso's demo. You can try it with:

It's early. I'd appreciate feedback on the API and the Hrana server, or a bug report if your SQL breaks. A failing query helps a lot.


r/sqlite • • Oct 05 '26

What made a SQLite job queue fast enough

14 Upvotes

I built a job queue on SQLite. The obvious concern is the single writer, so I benchmarked each step I used to work around it.

First: WAL.

On the queue workload, WAL was about 5-7x faster than DELETE journal mode.

Then I reduced the number of write transactions.

Claiming jobs in batches improved throughput by roughly 76-82% at concurrency 16.

The next step was a coordinator shared by all queues using the same database. Instead of every queue opening its own claim transaction, claims that arrive together are grouped into one transaction.

This matters most when there are many queues with low concurrency: each queue may only need one job, but the coordinator can still turn dozens of tiny write transactions into one. At higher per-queue concurrency, regular batching already captures most of that win.

That improved throughput by about 18% at concurrency 1, but only around 5% at concurrency 16.

The downside was transaction size.

With 256 queues and enough work available, one grouped claim could grow to 4096 jobs. Transaction p95 reached about 100 ms. That is bad both for another SQLite writer and, with a synchronous Node SQLite driver, for the event loop.

So I capped grouped claims at 512 jobs per transaction.

That reduced transaction p95 from ~100 ms to ~18-22 ms and competing-writer latency from ~63-68 ms to roughly ~10-22 ms, while keeping around 91-96% of the throughput of the huge transaction.

One more thing I tested was synchronous=FULL.

On heavily batched claim-only workloads, FULL and NORMAL were almost identical. On the complete end-to-end queue workload, FULL was still around 20-30% slower, mostly because completions are currently individual writes.

So the current shape is:

WAL, fewer transactions, group claims across queues, then put a hard bound on how large each write transaction is allowed to become.

Benchmarks and implementation:
https://github.com/unsady/walq


r/sqlite • • Oct 05 '26

Inspecting an exported SQLite file on Android, with a WAL caveat

4 Upvotes

For a quick look at an exported SQLite database, this read query lists its user tables:

SELECT name FROM sqlite_schema WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name;

Then inspect the schema before querying unfamiliar tables. One export caveat: when a source database uses WAL mode, committed changes can still be in its -wal file. Copying just the .db while the source app is active may omit them. Use the source app's consistent database export/backup rather than assuming one copied file is a complete snapshot. SQLite's explanation: https://sqlite.org/wal.html

I built SQLite Workbench for browsing user-accessible local SQLite files on Android. Table inspection, read queries, integrity checks and CSV/JSONL exports up to 1,000 rows are free. Optional one-time Pro adds larger exports and other workbench features. No ads or required account.

Play: https://play.google.com/store/apps/details?id=com.superevilrobots.sqliteworkbench

It is for local SQLite files, not a remote PostgreSQL/SQL Server connection or access to another app's protected storage. Disclosure: I'm the developer and used AI assistance in development.


r/sqlite • • Oct 04 '26

Anyone migrating old DBF/FoxPro/Works data to SQLite who has a small sample with known values?

5 Upvotes

I'm testing a small local Windows app, built with AI coding assistance, that extracts data from a limited set of legacy database files. I'm hoping someone here who has migrated an old database to SQLite still has a small source file and a few values we can independently check.

It currently handles Windows Works .WDB main tables, dBASE III .DBF + .DBT text memos, and limited Visual FoxPro .DBF + .FPT text memos. Inputs are capped at 1 MiB per file. Memo sidecars need the original matching DBF.

The app exports JSON and .xlsx; direct SQLite import/export isn't supported. The goal of this test is to verify the extraction against the original program, a healthy backup, an existing export, or a known-good SQLite migration. A tiny fictional database created in the original program would work too.

It leaves supplied files unchanged, retains exact originals, and flags unsupported or unresolved data. I've tested synthetic/public samples and the portable build on my own Windows computer, but no recovery has yet been verified for a real file owner.

If you have a suitable sample, please reply with the source program/version, file types and sizes, and a few values you can verify. Use only files you own and may share; please don't post confidential records or attach a private database here. No download or file attachment is needed for the first reply.


r/sqlite • • Oct 04 '26

What is the safest way to move a live WAL-mode SQLite database to another host?

12 Upvotes

Copying only the main database file can miss committed pages that still live in the WAL, while copying the database, WAL, and shared-memory files independently can capture them at inconsistent moments. Stopping every writer is simple but not always convenient, and a file copy that opens successfully does not prove that the latest committed state or application invariants survived.

The safer choices seem to be the online backup API, `VACUUM INTO`, or a short maintenance window with a clean checkpoint and closed connections. After transfer, the destination could run `quick_check` or `integrity_check`, compare schema and user-version values, verify expected row counts and selected aggregates, exercise application reads and writes, and complete its own backup and restore before the source is removed. File permissions, extensions, collation behavior, and SQLite library versions may matter across hosts.

Which method do you trust for a live move, and what evidence tells you it captured the intended transaction boundary? Are there WAL, busy-timeout, filesystem, or version-specific edge cases that make the backup API or `VACUUM INTO` preferable for migration rather than ordinary backup?


r/sqlite • • Oct 04 '26

I made a one minute SQLite demo video with a free tool I built

21 Upvotes

This shows real SQLite commands for JSON and running totals. I used SQLite 3.53.4 with made-up bakery data.

I made it with explainroo, a free tool I built. It's open source at https://github.com/vincentsch/explainroo


r/sqlite • • Oct 03 '26

What is the best modern database GUI for SQLite and PostgreSQL?

19 Upvotes

I’m learning Laravel and working with SQLite and PostgreSQL. I’m looking for a modern database GUI with a clean interface similar to Supabase Studio. I mainly need to:

  • Browse tables and records
  • View schemas and relationships
  • Edit records
  • Run SQL queries
  • Connect to both local SQLite and PostgreSQL

I used Dbeaver and i dont like its UI very old fashioned. Which one do you recommend for a beginner? Free options.


r/sqlite • • Oct 02 '26

How we saved $4,000/mo by replacing Redis with SQLite for our job queue

Thumbnail kylesinvestigation.com
40 Upvotes

r/sqlite • • Oct 02 '26

sqlx4k 1.14.0 released: optimistic locking, savepoints, MariaDB batch inserts

Thumbnail reddit.com
4 Upvotes

r/sqlite • • Sep 30 '26

I built a open-source, ad-free SQLite Admin app for Android because the Play Store options are broken

Thumbnail gallery
2 Upvotes