đŸ”„ The DB Grill đŸ”„

Where database blog posts get flame-broiled to perfection

PgBench on MongoDB via Foreign Data Wrapper
Originally from dev.to/feed/franckpachot
January 23, 2026 ‱ Roasted by Jamie "Vendetta" Mitchell Read Original Article

Ah, this is just fantastic. Truly. A masterpiece of technical inquiry, run on the very pinnacle of enterprise-grade hardware: a single laptop. It warms my heart to see the old gang is still committed to bold innovation and rigorous, real-world testing. It’s not a benchmark, it’s an experiment. Of course it is. That's what we called the Q3 roadmap right before we had to rewrite it in Q4 after it met actual customers.

I have to applaud the sheer elegance of the central premise. They found the one workload pgbench is famously bad at—a single-row hot spot causing massive lock contention—and used it to declare a victory. It’s like winning a race against a guy whose legs are tied together and then publishing a paper on your superior running form. Genius. Pure marketing genius.

And this line, my god, it’s beautiful enough to bring a tear to my eye:

This is where MongoDB shines, as it provides ACID guarantees without locking.

Chef’s kiss. It’s finally here, the free lunch we were all promised! The engineering trade-off to end all trade-offs has been solved. No locking, just pure, unadulterated ACID. I’m sure the army of engineers I remember frantically trying to debug transaction retry storms and conflict exceptions under optimistic concurrency control just misunderstood the fundamental brilliance of the design. They weren't bugs, they were features of a lock-free paradise!

The technical setup is a thing of beauty, too. It’s got that classic "move fast and sed things" energy that I miss so dearly. Why bother with a properly maintained, optimized FDW when you can just pop open the Dockerfile and surgically remove inconvenient lines of code yourself?

RUN sed -i -e '/Ping the database using/d' ... connection.c

That’s the kind of agile, results-driven engineering that gets you a promotion. Who needs peer review when you have command-line text processing? It also fills me with confidence that the FDW doesn't even support something as basic as TRUNCATE. It’s not a bug, you see, it’s a philosophical stance against destructive data operations. Very forward-thinking.

The conclusion is my favorite part. "The additional layer’s overhead offset by the faster storage engine." It’s just so perfect. The franken-architecture of routing PostgreSQL queries through a foreign data wrapper to another database is, naturally, a bit heavy. But fear not! The underlying engine is so magically fast it just absorbs the performance cost of the translation layer we bolted on top. It’s like putting a jet engine on a unicycle—sure, the steering is a nightmare and it’s fundamentally unstable, but look how fast the wheel spins!

And the final advice:

What really matters is understanding how your database works.

I couldn’t agree more. And what I understand from this is that if your application's entire workload consists of 50 clients hammering a single row on a MacBook, then boy, have they got a solution for you. For everyone else, maybe stick to using a database for what it was actually designed for.

But honestly, keep up the great work, team. This is exactly the kind of hard-hitting, totally-not-a-benchmark data that looks fantastic on a keynote slide. Can't wait to see what "experiment" you cook up next. Maybe you can prove it’s faster at sorting an empty list, too. The possibilities are endless.