3 ms·
SQL Server avoids vacuum as well, it might be this way, I can't recall. And of course MySQL avoids vacuum by giving a giant middle to concurrency consideration
by paulddraper 3y ago
SQL Server avoids vacuum as well, it might be this way, I can't recall.
And of course MySQL avoids vacuum by giving a giant middle to concurrency considerations.
- glogla 3y agoI'm pretty sure SQL Server and MySQL use locking instead of MultiVersion Concurrency Control so they don't keep more copies of data around. No vacuum needed but there's a possibility of things blocking. But I might be out of date.
- paulddraper 3y agoYes, MySQL has read locks. But I don't believe SQL Server does.
- evanelias 3y agoInnoDB (MySQL's default storage engine) implements MVCC using undo logging and background purge threads. It scales to highly concurrent OLTP workloads quite well. It doesn't work well with OLAP workloads / long-running transactions though. The oldest active transaction will block purging of anything newer than that transaction's snapshot.
- arbitrix 3y agoSQL Server has had MVCC since 2005.
- DaiPlusPlus 3y agoYes, but doesn't it require opt-in to enable snapshopt isolation? Most T-SQL devs will probably default to locking (TABLLOCK, etc) becuase that's what the bulk of google search results for "how do I fix my broken query?" tell people to do: it's only very, very rarely do I see a stackoverflow or dba.se answer that mentions MVCC-related topics.
- tomnipotent 3y agoThat's because they don't store non-current versions of rows in the table itself, so why would they need a vacuum? MySQL does need to vacuum indexes, however.