4 ms·
8 bytes of new data but 8x28 = 224 bytes = 200 data + 8 date + 16 for id. The 28 is a factor (×).
by wisty 3y ago
8 bytes of new data but 8x28 = 224 bytes = 200 data + 8 date + 16 for id.
The 28 is a factor (×).
- Rapzid 3y agoI should have used more precise language; I mean the bytes written to disk don't work out with such a simple formula. Missed the footnote which discusses this, but there are even more things to consider such as how many rows are being updated at once and etc.
- Rapzid 3y agoTo add to this for anyone reading later.. The OS doesn't write bytes to the storage; it writes blocks. For modern drives the sector size is 4k, and the block io size is likely to be 4k unless utilizing 512b emulation. So, the OS will always send 4k minimum writes to the storage device. In this case updating just the 8bytes would still result in a 4k write; at least to the wal then again to update the page plus index updates and etc.