Radim @ boringSQL
@boringsql.com
📤 52
📥 36
📝 44
Straightforward PostgreSQL and SQL tips, tricks, and tools to get stuff done (no fluff).
reposted by
Radim @ boringSQL
PostgresEDI
about 1 hour ago
This week:
#PostgreSQL
#Edinburgh
#meetup
on 📅 Thurs, March 12th! Join
@boringsql.com
and
@vyruss.org
for talks on making sure your queries don't break production & on how easy it is to run
#Postgres
on
#Kubernetes
with
@cloudnativepg.bsky.social
👇
luma.com/5pglgx8h
#CloudNativePG
#k8s
#TechMeetups
0
2
2
Major progress for RegreSQL 2.0. It can now force pretty much any statistics. Yesterday I highlighted the current limitation of overriding statistics. Today I can show you planner being completely independent and choosing Bitmap Index Scan on table with 1 tuple.
about 19 hours ago
0
1
0
What happens when you inject production statistics into a 10,000-row PostgreSQL test table? The query plan flips. PostgreSQL 18 makes this a one-liner. pg_dump --statistics-only Plain SQL, under 1MB, no data needed. Learn the mechanics in my latest blog post.
boringsql.com/posts/portab...
loading . . .
Production query plans without production data
PostgreSQL 18 makes optimizer statistics portable. Export them from production and inject them into test databases to get realistic query plans without the data.
https://boringsql.com/posts/portable-stats/
1 day ago
0
2
0
#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...
loading . . .
PostgreSQL Statistics: Why queries run slow
Slow PostgreSQL queries? Stale statistics are often to blame. Learn how the query planner uses statistics to estimate row counts and how to fix them.
https://boringsql.com/posts/postgresql-statistics/
11 days ago
1
1
0
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.
14 days ago
2
4
2
#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.
17 days ago
1
1
0
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...
loading . . .
Inside PostgreSQL's 8KB Page
A byte-level tour of the 8KB page. PostgreSQL's atomic unit of storage. We deep dive into page headers, line pointers, and free space using pageinspect to see exactly how your data lives on disk.
https://boringsql.com/posts/inside-the-8kb-page/
19 days ago
1
1
0
"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...
loading . . .
The Alchemy of Shared Buffers: Balancing Concurrency and Performance
Josef Machytka: Speaker portfolio
https://medium.com/@josef.machytka/the-alchemy-of-shared-buffers-balancing-concurrency-and-performance-2e15be67aefe
28 days ago
0
1
0
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
loading . . .
Reading Buffer statistics in EXPLAIN output
Learn how to interpret buffer statistics in PostgreSQL EXPLAIN output. Understand shared hits, disk reads, temp spills, and planning buffers to accurately diagnose and fix query performance bottleneck...
https://boringsql.com/posts/explain-buffers/
about 1 month ago
0
1
0
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
about 1 month ago
1
1
0
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
about 1 month ago
0
1
0
reposted by
Radim @ boringSQL
Prague PostgreSQL Developer Day
about 1 month ago
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! 🇨🇿💙
0
3
2
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.
loading . . .
Introduction to Buffers in PostgreSQL
How PostgreSQL actually manages memory, from shared_buffers and dirty pages to the OS page cache sitting underneath it all.
https://boringsql.com/posts/introduction-to-buffers/
about 1 month ago
0
0
0
First testing of RegreSQL integration with Rails / ActiveRecord via `rake regresql:export`.
about 2 months ago
0
1
0
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...
loading . . .
Postgres FM | RegreSQL
Nik and Michael are joined by Radim Marek from boringSQL to talk about RegreSQL, a regression testing tool for SQL queries they forked and improved recently. Here are some links to things they ment...
https://postgres.fm/episodes/regresql
about 2 months ago
1
1
0
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.
about 2 months ago
0
3
2
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...
loading . . .
The hidden cost of PostgreSQL arrays
Deep dive into PostgreSQL arrays: why they're document storage in disguise, the TOAST performance trap, GIN vs B-tree indexing, the dangerous ANY() operator, and when junction tables beat arrays.
https://boringsql.com/posts/good-bad-arrays/
about 2 months ago
0
0
0
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
2 months ago
0
0
0
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...
loading . . .
Introducing pg-storage-visualizer
YouTube video by boringSQL
https://www.youtube.com/watch?v=fRz1ul2ynOs&t=1s
2 months ago
0
0
0
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...
loading . . .
Instant database clones with PostgreSQL 18
Learn how to clone PostgreSQL databases instantly using reflinks. Turn slow template copies into milliseconds with PostgreSQL 18's new file copy options.
https://boringsql.com/posts/instant-database-clones/
3 months ago
0
1
1
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...
4 months ago
0
2
0
Can't believe it's 5 years since my first pull request. Now sharing RegreSQL as my own fork.
boringsql.com/posts/regres...
loading . . .
RegreSQL: Regression Testing for PostgreSQL Queries
Stop deploying broken SQL queries. RegreSQL provides regression testing for PostgreSQL queries with performance baselines and automated warnings.
https://boringsql.com/posts/regresql-testing-queries/
4 months ago
0
1
0
reposted by
Radim @ boringSQL
Markus Winand
4 months ago
“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/
loading . . .
The Quiet Power of SQL – Sturdy Statistics Blog
https://blog.sturdystatistics.com/posts/sql/
0
8
2
Range types are one of PostgreSQL’s most underutilized features — let’s change that
boringsql.com/posts/beyond...
#postgresql
loading . . .
Beyond Start and End: PostgreSQL Range Types
Discover PostgreSQL range types for cleaner schemas and atomic conflict detection. Use tstzrange, daterange, and int4range to enforce data integrity with exclusion constraints.
https://boringsql.com/posts/beyond-start-end-columns/
4 months ago
0
0
0
Back after the summer break with a new article on PostgreSQL security: performing common maintenance tasks without distributing SUPERUSER privileges.
boringsql.com/posts/postgr...
loading . . .
PostgreSQL maintenance without superuser
Learn about PostgreSQL maintenance without superuser privileges. Predefined roles like pg_monitor and pg_maintain provide secure database administration.
https://boringsql.com/posts/postgresql-predefined-roles/
6 months ago
0
0
0
Attending ViennaDB meet up
11 months ago
1
0
0
reposted by
Radim @ boringSQL
PostgreSQL
11 months ago
Time to Better Know the Time in PostgreSQL Article URL: https://notso.boringsql.com/posts/know-th...
https://notso.boringsql.com/posts/know-the-time-in-postgresql/
Event Attributes
loading . . .
Time to Better Know The Time in PostgreSQL | boringSQL
Deep dive into SQL & PostgreSQL to build reliable, rock-solid solutions with tips and tricks that keep business online. Data is everything. Explore, learn and innnovate to get them where you need faster and more efficiently.
https://notso.boringsql.com/posts/know-the-time-in-postgresql/
0
1
2
Back with "VIEW inlining in PostgreSQL"
notso.boringsql.com/posts/view-i...
loading . . .
VIEW inlining in PostgreSQL | boringSQL
Deep dive into SQL & PostgreSQL to build reliable, rock-solid solutions with tips and tricks that keep business online. Data is everything. Explore, learn and innnovate to get them where you need fast...
https://notso.boringsql.com/posts/view-inlining/
about 1 year ago
0
0
0
A good way to end 2024 - migrating personal servers to FreeBSD
about 1 year ago
1
2
0
Meet me and other PostgreSQL enthusiasts in London (UK) next week
www.meetup.com/london-postg...
loading . . .
Elephants At The Watering Hole, Wed, Dec 11, 2024, 6:30 PM | Meetup
**HI Everybody** Come along and talk about PostgreSQL with fellow PostgreSQL users, specialists, developers and all round enthusiasts of PostgreSQL. This is a relaxed soci
https://www.meetup.com/london-postgresql-meetup-group/events/304775898/
over 1 year ago
0
0
0
Impostor syndrome always hits me hard when something gets this much exposure 🙈
add a skeleton here at some point
over 1 year ago
1
4
1
You can probably guess where this leads. Since transactions are already a pain for developers, imagine the chaos when issues hits the production. Locks and a growing queue of waiting statements are inevitable… Fun starts in 3, 2, 1.
over 1 year ago
0
1
0
Preparing a draft for the next article, which touches on transaction isolation (not the main topic though). This means the text needs to be super clear and include plenty of examples. Transactions are the number one source of pain for the majority of developers (unfortunately).
over 1 year ago
0
1
0
reposted by
Radim @ boringSQL
Comfortably Numb
over 1 year ago
ORM are evil. SQL is meant to be handcrafted.
6
69
4
Not really doing anything for optimising SEO and stuff like that, but it's surprising to see ChatGPT as referrer for boringSQL more and more 🤔
over 1 year ago
0
1
0
you reached the end!!
feeds!
log in