High volume site using ADO.NET TransactionScope vs ExecuteCommand on NOLOCK, READ UNCOMMITTED directly?

后端 未结 4 2121
长发绾君心
长发绾君心 2021-02-04 20:33

Just read this interesting article by Omar on his blog Linq to SQL solve Transaction deadlock and Query timeout problem using uncommitted reads and at the end Javed Hasan star

4条回答
  •  星月不相逢
    2021-02-04 21:18

    I'm a developer on a tools team in the SQL Server group at Microsoft. Many applications are not super-sensitive to transaction consistency, especially if you writing an app which does reporting or something where occasionally inconsistent data is not the end of the world. Of course, if you writing a financial application or something else which has very low tolerance for data inconsistency, you probably want to explore other solutions.

    If do choose to use uncommitted reads, I have blogged a handy solution using extension methods in C#.

提交回复
热议问题