HN Hall of Fame Weekly email

The surprising impact of medium-size texts on PostgreSQL performance

hakibenita.com Essays & writing Essays & articles Software engineering Candidate
Screenshot of hakibenita.com captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 3 calendar years, with breakout response in 2 of them.

submissions
3
submitters
3
observed span
2020–2023
peak thread · 31 comments
182 pts
latest 20+ return · 2023-08-30
105 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

I've mentioned this story here before, but one of the most surprising performance gains I saw was by eliminating TOAST look ups. If I recall correctly, each time you use the `->>` operator on a TOASTed JSONb column, the column will be deTOASTed. That means if you write a query like: SELECT x ->> 'field1', x ->> 'field2', x ->> 'field3' FROM table and x is TOASTed, Postgres will deTOAST x three different times. This multiplies the amount of data…

I remember when working with Oracle 20 years ago the DBA liked to make sidecar tables to hold the big columns, so they were out of the way of most queries. It was awkward but I guess it was worth it. One time after starting to use Postgres I almost did the same thing, but then I realized the database was already doing it for me. TOAST really is the greatest thing since sliced bread! If you made it to…

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
292

reference only — not used in Hall rules or ranking

Total comments
47

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2020-10-20The surprising impact of medium-size texts on PostgreSQL performanceFirst breakout · Best threadhaki18216
2022-01-20The surprising impact of medium-size texts on PostgreSQL performancetonyhb50
2023-08-30The Surprising Impact of Medium-Size Texts on PostgreSQL Performance (2020)Latest 20+ point returnskadamat10531