You just might be onto something π€£ I've been looking for something for the back of the t-shirts and I think we have a strong candidate
Equality: 0.5%
Ranges: 33%
May your indexes be with you
You just might be onto something π€£ I've been looking for something for the back of the t-shirts and I think we have a strong candidate
Equality: 0.5%
Ranges: 33%
May your indexes be with you
Or what about cases where there are no statistics at all? Like materialized CTEs, temporary tables, or computed expressions in WHERE clauses. The planner falls back to hardcoded constants. 0.5% selectivity for equality. 33% for ranges. Good luck.
#postgresql takes a bite of 30,000 rows from your 50 million row table and calls it a day. That's 0.06% of your data deciding if your query will be fast or slow.
boringsql.com/posts/postgr...
It's not magic. It's called SQL query regression testing. π» as postmortem π
Step 1: "LGTM, this query is fine"
Step 2: Deploy to production
Step 3: Pray π
Step 4: SRE - "This query is definitely NOT fine"
Step 5: "But... it worked on MY database" π₯
No ifs. No buts. On 12 March @postgresedi.bsky.social find out how to become an atheist when it comes to your SQL queries.
Busted :) These are the ones I'm speaking at - next time I'll have to do better proposal so Paris find me worthy π
#postgresql season is officially on. I'll be on the ground at
πͺπΊ Nordic pgDay in Helsinki (March)
πͺπΊ German pgConf in Essen (April)
πΊπΈ PGDATA in Chicago (June)
π¬π§ pgDay in London (September)
Iβm looking forward to all the chats and fun that's ahead.
To make it bit more fun, you can play with the 2nd visualizer.
boringsql.com/visualizers/...
Epitome of boring. What else to write on site called boringSQL then dry introduction of what is inside #postgresql 8KB page?
boringsql.com/posts/inside...
"The Alchemy of Shared Buffers" must have been amazing presentation by Josef Machytka during CERN pgDay (had to skip that one unfortunately). It's worth checking the slides.
medium.com/@josef.machy...
Back to Buffers. This time you can learn how to read and understand Buffer statistics in EXPLAIN output in my latest article boringsql.com/posts/explai... #postgresql
While this led to 2748 lines dropped from RegreSQL it gets things done. Stay tuned for 2.0 release!
That's where new project "fixturize" comes in:
github.com/boringSQL/fi...
its goal is to retrieve data snapshots with referential integrity intact, while masking sensitive data in the process.
But it's not bad news. Agonising over fixtures forced me to look at the problem from another direction - how to quickly and securely use production data. Gave up on sampling, only to find a better solution:
graph-traversal based data extraction with masking to strip customer data and PII.
While other changes leading up to v2.0 are strong quality-of-life improvements, I've decided to pull generated fixture support out of RegreSQL entirely for now.
There are weeks of full wins, and those where it's time to eat the humble cake. RegreSQL has been making great progress, but I've been fighting the fixture system more and more. After many conversations and endless evenings - it's time to admit:
fixtures are a genuinely hard problem
Still recharging after this week. But it's that good kind of tired - the one you get when something actually matters.
@praguepgdevday.bsky.social was my first time speaking at a bigger Postgres event. The RegreSQL session went well, but honestly? The conversations afterwards were the real thing
Thatβs a wrap at #P2D2! π Huge thanks to our amazing speakers, organizers, and attendees for making it unforgettable.
PostgreSQL, people, and Pragueβwhat a combo. We canβt wait to do it again next year. See you soon β brzy na vidΔnou! π¨πΏπ
Buffers came up during Postgres FM chat and people asked why they matter so much. So I wrote about it - with interactive demos to make it click.
Introduction to Buffers: boringsql.com/posts/introd...
Do the visuals help you to grasp the concept easier? Let me know.
First testing of RegreSQL integration with Rails / ActiveRecord via `rake regresql:export`.
I got myself talking about the motivation behind RegreSQL on Postgres FM ποΈ
We nerded out a bit about why timing is a terrible metric, why buffers actually matter, statistics, performance β and why all of this is more relevant in the age of agentic coding.
postgres.fm/episodes/reg...
Test if queries hit the right indexes at production scale β without needing to have production data.
I'll show you exactly how during @praguepgdevday.bsky.social - Session "It works on my database - Regression testing of SQL queries" is last of the day, but I intend to make it worth staying for.
Where do you stand when it comes to #postgresql arrays?
If you want to learn more, check out my latest deep-dive into the topic of arrays, exploring TOAST, GIN indexing gotchas, and when to just use a link table.
boringsql.com/posts/good-b...
Writing about instant clones of PostgreSQL databases was not a clever move. Now I have to keep repeating to myself:
I will NOT rewrite the whole control plane
I will NOT scrap everything for #freebsd jails
I will NOT rebuild everything with native ZFS snapshots
Introducing pg-storage-visualiser - tool made for EDUCATIONAL purposes to help you better understand how hashtag #postgresql stores data (both tables and indexes).
The repository is available at GitHub github.com/boringSQL/pg...
www.youtube.com/watch?v=fRz1...
Ha! Wanted to write about #postgresql 18's new features, but most got covered already. One I haven't seen mentioned yet is file_copy_method.
It's foundation for some SQL Labs features I'm building, so let's spread the word.
Instant database clones with PostgreSQL 18
boringsql.com/posts/instan...
It's gonna be cold, grey, and dark, but thanks to Postgres community events, there's something to look forward to. My evenings are busy next week, but in a good way - are you going to join me?
Mon, 24 Nov in Prague - lnkd.in/dP5es2Nc
Thu, 27 Nov in Malmo - www.meetup.com/malmo-postgr...
Can't believe it's 5 years since my first pull request. Now sharing RegreSQL as my own fork.
boringsql.com/posts/regres...
βEarly in our companyβs life, we built everything around modern data frameworks β until we realized the simplest, most reliable tool had been in front of us all alongβ
blog.sturdystatistics.com/posts/sql/
Range types are one of PostgreSQLβs most underutilized features β letβs change that boringsql.com/posts/beyond...
#postgresql