|
|
|
|
|
by macdice
3031 days ago
|
|
There was an intelligent comment about the extra writes when writing to UNDO and the extra reads when anyone needs to read UNDO and suggesting that it might not always beat the traditional system which just has to write a new tuple. It was deleted while I was composing my reply, so here, without context, is my reply! Certainly there are complicated trade-offs here. Some things to consider: (1) unless the pages get flushed to disk due to memory pressure or a checkpoint, the UNDO data won't hit the disk so that '2x write' isn't a disk write, (2) in-place updates don't require every index to be updated (only indexes whose key changed), skipping the famous "write amplification" problem (more generally than HOT can), (3) the 2x reads for transactions that need modified rows applies only to transactions running with old snapshots; in the traditional system every transaction pays for reading past the bloat that can't be cleaned up (in other words, an old snapshot is a tax on every transaction in the traditional design, but UNDO is only a tax on the transaction that's using an old snapshot in this proposed system). |
|