3 ms·
The implementation of these kinds of features is a lot easier than one might think if you use multi-versioned storage. You delay garbage collection of old versi
by ryanworl 8y ago
The implementation of these kinds of features is a lot easier than one might think if you use multi-versioned storage. You delay garbage collection of old versions of rows until the configured cut off (or never if you want to go to any time) and ignore rows with a higher timestamp when reading.
Where you can hit trouble is if you can’t garbage collect fast enough and you run out of IOPS or disk bandwidth and the system wasn’t smart enough to issue back pressure before the new data was accepted into the system.
- grogers 8y agoHowever, the garbage collection is typically _heavily_ optimized for short lived garbage. Try pausing GC by keeping a transaction open for an hour or more and see how the DB performance changes. So I think there's still probably a little extra smarts going into something like mariadb's system versioned tables.
- ryanworl 8y agoI may be misunderstanding the documentation, but it appears MariaDB system versioned tables don't do any garbage collection at all (it stores all versions forever), and requires reading over (skipping) old versions at runtime.