AI-Friendly Database Benchmark

What this is, in plain words

30-second version

AI coding assistants (like the ones built into modern code editors) can now write working software. To do it, the AI has to read and understand where your data lives before it can write a single line.

We gave two different AI assistants the exact same job, twice: once where the data lived in MongoDB, and once where the same data lived in Postgres. These are the two most popular ways to store data. They organize it differently: MongoDB keeps everything about one thing together in a single record; Postgres splits it across many connected tables that the AI must stitch back together.

We then measured how much work each AI had to do to finish the job — how much it had to read, how long it took, how much it cost. Same result, same test, every time. The one thing we deliberately changed was the shape of the data, so the differences you see line up with that choice.

A note for the technically-minded: each run uses the database's own data in its native shape (one document for MongoDB, related tables for Postgres), and the AI's work is checked against it. It is a focused pilot study, not yet a final verdict on every app — see "How we kept it honest" below for exactly what we did and didn't prove.

Same job, two databases — here's the difference

Shorter bar is better — it means less work for the AI. We only ever compare each AI assistant to itself.

Text read — how much the AI had to read to finish. Cost — the bill for that work. Time — how long it took. False starts — tries that errored and had to be redone.

Does the gap grow as the database gets more complex?

We built the same feature on three Postgres designs, from simple to detailed. MongoDB stays one record every time; Postgres spreads the data across more and more connected tables.

Why the difference happens

These are approximate counts, scanned from each AI's recorded work session — a directional indicator, not an exact tally. On Postgres, a JOIN is the step that stitches separate tables back together; the AI writes one for every connection it needs.

How we kept it honest

Inspect the evidence

Every number on this page comes from a real file you can open. Each file is fingerprinted, so if anyone changed a number after the fact, this page would refuse to load it.