3 ms·
It happens when concurrent queries update records in a different sequence, but the same application on Postgres never deadlocks. SQL Server has like 4 differen
by gaius 8y ago
It happens when concurrent queries update records in a different sequence, but the same application on Postgres never deadlocks.
SQL Server has like 4 different isolation levels + MVCC, you just pick the one you need. Postgres just does MVCC so it sounds like you should just switch SQL Server to that mode. A poor workman blames his tools. Unless that tool is MongoDB.
- panarky 8y ago> just switch SQL Server to MVCC In the real world of mediocre DBAs and databases managed by application vendors, it's never that easy, is it? Postgres just works with default settings while SQL Server chokes on the same transactions with the same volumes. SQL Server is legendary [0] for deadlocks even when the workload is mostly reads and rarely writes. You just don't see this with Oracle, Postgres or MySQL with default settings. Not sure why I'd pay for the privilege of extra headaches. [0] It was a problem in 2008, still not resolved https://blog.codinghorror.com/deadlocked/ https://blog.codinghorror.com/deadlocked/
- manigandham 8y agoYes the defaults are more pessimistic but why is such a problem to change the locking level? SQL Server has one of the most advanced query optimizers. Are you running on an old version or using out of date statistics?