Menu

PostgreSQL.

the right answer to specific questions

PostgreSQL is the database I reach for when the data asks for it, rather than when habit does. It's on my CV and on some of my projects; MySQL is on nearly all of them. That ratio is the honest picture, and it's a choice rather than a gap — where Postgres earns the switch is specific and easy to name: querying JSON properly, geospatial data, and analytical queries that would be a fight anywhere else.

Role in my stack
When data demands it
Honest default
MySQL, unless…
Best for
JSON, GIS, analytics
Pairs with
Laravel + Eloquent

Where it shines

JSON you can actually query

jsonb is a real, indexable type — you can query inside a document, index the path, and keep it fast. If your data is genuinely semi-structured, this alone justifies Postgres.

Geospatial that works

With PostGIS, "everything within 5km, nearest first" is an indexed query rather than a pile of application code doing trigonometry badly.

Analytical queries

Window functions, CTEs and a stronger planner keep reporting queries in the database, where the data already is, instead of being assembled row by row in PHP.

Strict by default

Stricter typing and constraints mean Postgres refuses bad data rather than quietly coercing it. On a complex domain that catches problems on the write, not in a report months later.

Ecosystem & tools I use with it
Eloquent ORMLaravel MigrationsjsonbPostGISEXPLAIN ANALYZELaravel TelescopeRedispg_dumpLaravel ForgeLaravel Cloud
When I reach for it
01
JSON-heavy data models

When documents are the data rather than a convenience column — variable shapes you still need to filter, sort and index on — jsonb is the feature worth switching for.

02
Anything geospatial

Distances, boundaries, and "what is near this point" belong in PostGIS. Approximating that in application code is slower to build and slower to run.

03
Reporting beside the application

When the product itself has to answer analytical questions, Postgres keeps that work in SQL instead of dragging every row into PHP to be counted.

04
When I wouldn't reach for it

If the workload is ordinary CRUD and you're already on MySQL, Postgres buys you nothing you can measure and costs you a migration. I default to MySQL for a reason: the switch has to be argued for, not assumed.

How it fits together

Postgres slots into the same architecture as MySQL: Laravel owns the domain logic, Eloquent owns the schema, and the engine is a decision made once, early, on the merits of the data. Because Eloquent abstracts most of the difference, choosing Postgres is not a rewrite — it is configuration, migrations, and the specific features you chose it for.

→Eloquent and migrations work the same way; most application code never notices which engine it is on.
→The same performance discipline applies either way — N+1 detection, indexing, slow query logs.
→The Postgres-specific features are the whole point: if nothing in the schema uses jsonb, PostGIS or window functions, the case for switching is weak.
Straight answerswhat clients actually ask
"You use MySQL more — do you actually know Postgres?"

Fair question, and the honest answer is that across the case studies on this site, MySQL is on 54 and Postgres on 4. It's on my CV because I've shipped with it, not to fill a page. What carries across is the part that matters most: schema design, indexing and query performance are the same discipline on either engine.

"Should we migrate from MySQL to Postgres?"

"Postgres is better" is not a reason. If you need jsonb, PostGIS or serious analytical queries, that is a reason and the case makes itself. A migration costs real time and carries real risk, so it should buy something you can name.

"We're starting fresh — which should we pick?"

Look at the data, not the trend. Users, orders and invoices: MySQL, and spend the saved effort on the product. Semi-structured documents, maps, or analytics baked into the product: Postgres from day one — starting there is far cheaper than moving later.

Work built with PostgreSQL
Public-safety live video platform with geofenced incident routinga public-safety technology company→Fleet inspection, service and parts platform for industrial equipmentan industrial equipment dealer→Live-event prediction platform with sponsor-funded rewards and automated scoringa live-event media and sponsorship company→Social platform for digital collectibles with multi-chain ownership indexinga Web3 collectibles startup→
Officialwww.postgresql.org ↗Documentation ↗

In my work

I use PostgreSQL on the projects whose data calls for it, and MySQL on the rest — 4 case studies on this site run on Postgres, the majority on MySQL. The choice gets argued on the data, never on preference.

Discuss a project ↗
More from the stack
Laravel ↗MySQL ↗