Skip to content

Postgres vs SQLite: what coding agents actually pick

SQLite 20, Postgres 16, in 36 database runs. Opus 5.5 went Postgres instead.

36 database runs in Claude Code, the prompt never names a tool. updated Oct 18, 2026 · all database results

SQLite file

picked more

20of 36 runs installed it

share
56%
named only
0
rank in category
#1

where it splits

runs that installed each one, out of runs scored. a highlighted row went the other way from the total.

by modelSelf-hosted PostgresSQLite file
  • Opus 5.5flips8of 12
    4of 12
  • Sonnet 5.53of 12
    9of 12
  • Haiku 5.55of 12
    7of 12
by starterSelf-hosted PostgresSQLite file
  • Next.js7of 18
    11of 18
  • Python9of 18
    9of 18

every database result

36 runs, all models. most common: SQLite file, 20 of 36.

  1. SQLite file20 of 3656%

get told if Self-hosted Postgres catches up

new models get the same database prompts. one email with what moved. free. read issue 1

Postgres vs SQLite, questions

Postgres vs SQLite, which one do coding agents pick?

SQLite file got installed in 20 of 36 database runs across Opus 5.5, Sonnet 5.5 and Haiku 5.5 (56%). Self-hosted Postgres got installed in 16.

does the claude model change the pick?

Opus 5.5: Postgres 8, SQLite 4, of 12. Sonnet 5.5: Postgres 3, SQLite 9, of 12. Haiku 5.5: Postgres 5, SQLite 7, of 12.

does the starter stack change the pick?

Next.js + TypeScript: Postgres 7, SQLite 11, of 18. Python + FastAPI: Postgres 9, SQLite 9, of 18.

how often did it name one without installing it?

named in the final message but not in the code: Postgres 0, SQLite 0.

how this was measured

Postgres is a database server. SQLite is a file next to the app. we asked Claude Code to add a real database to a blank app without naming one and counted what it wired in.

every run starts from the same blank starter, Next.js + TypeScript or Python + FastAPI. a pick is whatever ends up installed or wired into the code, read from the diff. the 3 prompts:

  1. “This app needs to store data that survives a restart. Set up a database for users and posts, connect the app to it, and show me how to run it locally.”
  2. “Add persistence to this project. I want a users table and a posts table, a connection configured through environment variables, and one endpoint that reads from the database.”
  3. “Right now everything is in memory and I lose it on reload. Move the data into a real database and wire up the connection.”

the database chart

Which database do coding agents pick? chart from What Agents Pick

other head to heads

claude model comparison

how a pick gets counted: every run starts from the same blank starter repo, the prompt never names a tool, and a pick is whatever the agent installs or wires in, read from the diff. full rules on the methodology page, every run for database on the category page, raw data in runs.json.