Skip to content
Star16Hire me
01 / StartXP 0%
Sep 6, 2026 · 1 min · by Ahmed Mamdouh

Mongo or Postgres is the wrong first question

#mongodb#postgresql#databases

"Should we use Mongo or Postgres?" is almost never the question that matters. The one that does is whether you know your access patterns yet.

If you know your access patterns

Pick the database that makes your top three queries cheap and lets you enforce your consistency rules. Write those queries down before you choose. If they mostly fetch one self-contained document by key, a document store fits. If they join across entities or depend on constraints and transactions, a relational database fits.

If you don't know them yet

Pick Postgres, because it forgives wrong guesses better than anything else. You can add indexes, reshape tables, introduce new relationships and store JSON when you need flexibility, and none of that requires betting the whole data model on a guess.

Where the regrets came from

I've run both in production for years. The regrets never came from the database. They came from choosing one before we understood what we were building.

Building something like this?

I'm Ahmed Mamdouh, a senior full-stack and AI engineer. I reply within one working day.

More posts