I have a table that holds issue reports. Each row has a few fields that change all day (a status, a counter, a timestamp) and one big JSONB column holding the whole issue body. The status flips every time someone triages an issue, the body almost never changes, and the write-ahead log on that database had started to feel like the most expensive part of the whole setup. A reader, johnnylemonny, left a comment on my last piece about JSONB under write load, and his point was blunt: do not split the hot fields into a side table. The big payload already lives outside the row in TOAST, he said, so an update that only touches the hot fields rewrites a narrow tuple with an 18-byte pointer where the payload used to be. The side table would save almost nothing and charge you a second insert, a second primary key index, and a join on every read.
I believed him. Almost. The reasoning is clean, and clean reasoning about databases has a way of being right right up until you measure it. So I measured it: same workload, two shapes, two payload sizes, everything twice. One thousand rows, hot fields updated in scattered rounds the way a real triage queue updates them, and the log measured before and after each batch so every number below is bytes that actually got written.
My claim before the numbers: the side table is not a saving. It is a bet on how often you rewrite the row. And like most bets, it pays on some rows and loses on others, and the payload size decides which.
Problem 1: HOT fires everywhere, and that changes the whole argument
The first surprise is how completely HOT wins. Across the eight cells, 7,996 of 8,000 hot-field updates were HOT updates, every cell at 99.9 percent or better. No index maintenance, no new index entries, just a new tuple version on the same page. That needs two things to be true: the columns you change are not indexed, and the page has free space. I gave the tables room with a fillfactor of 80, and I updated rows scattered across the table instead of sweeping the whole thing in one go.
That second detail matters more than it looks. My first attempt swept all 1,000 rows in a single update, and HOT fired only about a quarter of the time, because rewriting every row on a page burns through its free space in one pass. Scattered writes are what a live queue actually does, and under scattered writes HOT is not a sometimes thing. It is the whole story. If your hot fields are indexed, or your pages are packed full, none of what follows applies, and that is the first thing to check before you believe any number in this piece, including mine.
Problem 2: with a small payload, the split wins by a lot
When the payload is small, about 170 bytes, it stays inside the row. Then the in-table shape pays for it on every update: 368 bytes of log per hot-field update, because each new tuple version carries the payload along. Move the payload to a side table and the same update costs 150 bytes. That is a 218-byte saving per update, about 59 percent, and it is the only cell where the split looks like an obvious win.
But the split charges rent. Inserting a row now costs 513 bytes of log instead of 334, the extra insert plus its primary key index. Divide one by the other and the break-even is under one update per row: 179 bytes extra on the insert, 218 saved on each update. Any row that gets rewritten even once has paid for the split. Most rows in a triage queue get rewritten more than once, so for small inline payloads the side table is a fair trade, and the argument against it mostly fails.
Problem 3: with a big payload, TOAST does most of the work, not all of it
This is the cell johnnylemonny was actually arguing about, and he was mostly right. When the payload is about 8,180 bytes of real text, it spills out of the row into TOAST (five thousand toast chunks across my thousand rows), and the in-table hot update drops from 368 bytes to 231. The pointer really is cheap. The whole point of his comment survives the measurement: the scary version of this story, where every status flip rewrites eight kilobytes of issue body, does not happen. HOT plus TOAST already killed it.
Where his comment goes too far is the word "matching." The in-table update costs 231 bytes and the side-table update costs 151. The side table still wins, by 80 bytes per update, about 35 percent. The tuple version in the main table is still wider than the slim side row, pointer or not. Eighty bytes is not much, and on the insert side the split still charges its 182 bytes, so the break-even moves to about two and a quarter rewrites per row. But it is not zero, and "the split saves nothing" is the kind of clean claim that only survives until someone measures it. He reasoned from the mechanics. The mechanics said the pointer is 18 bytes. The measurement says the row around the pointer still costs you.
Problem 4: the insert is the payload, wherever you put it
The least surprising number is also the one that kills the most arguments. Inserting a row with an eight-kilobyte payload costs about 9,054 bytes of log in the table and 9,236 in the split shape. The payload has to be written once, wherever it lives, and TOAST writes it either way. The split adds 182 bytes to a nine-thousand-byte operation. If you were hoping the side table would make inserts cheaper, it will not, in either size: for the small payload the split makes inserts more expensive, and for the large one it makes them trivially more expensive. The split is a tax on writes that create rows and a discount on writes that change them. Whether that trade is good depends on your ratio of creates to rewrites, and nothing else.
Reads, for completeness: a thousand point lookups took between 0.12 and 0.29 seconds in both shapes, and the spread between my two repetitions was bigger than any gap between the shapes. At this size there is no join tax worth quoting. On a bigger table, with colder caches, there might be. This run cannot tell you that, and I am not going to pretend it can.
Problem 5: the run I threw away
I should say plainly that my first version of this run measured the wrong thing. The "large" payload I built was eight thousand copies of the same letter, and Postgres compressed it down to 173 bytes inside the row, so nothing ever spilled to TOAST and both sizes measured the same small thing. Real issue bodies do not compress fifty to one. I rebuilt the payload out of hundreds of different hashes so it would not compress, confirmed five thousand toast rows, and ran everything again. The numbers above are the second run. The lesson is boring and worth writing down: a test payload has to behave like the real data, and repeating characters do not.
The other honest limit: these are a thousand rows on one machine, hot fields unindexed, pages given room. Change any of that — an indexed status column, the default fillfactor, a vacuum that cannot keep up — and HOT stops firing, and the in-table shape gets expensive in exactly the way this piece says it does not. The numbers are real. Their range is narrow.
So the rule I am keeping is simple enough to fit on a sticky note. If the payload stays inline, split when rows get rewritten at all. If the payload spills to TOAST, split only when a row gets rewritten more than twice. And if a row is written once and never touched again, do not split it: you are paying an insert, an index, and a join for a discount you will never collect.
johnnylemonny's comment was the reason this piece exists, and he was right about the mechanism and wrong about the size of the saving, which is the best kind of comment to get. Where do you draw the line in your own tables — do you split hot fields out, or do you trust HOT and leave the row alone? And if you have measured it rather than reasoned it, what did the log actually say?
P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam

