1
在c#的一個transactionscope中有一個選擇sql查詢(select * from table1 eg)。通常有一個環境事務,但如果我執行這個SQL查詢時抑制環境事務,是否有性能增益?在抑制事務範圍內執行select sql查詢
using (TransactionScope scope1 = new TransactionScope())
{
// here there are some business processes
using (TransactionScope scope1 = new TransactionScope(TransactionScopeOption.Suppressed)) //Is this suppressed transaction scope useful in terms of performance?
{
//Here there is a select sql query with no lock table hint.
}
}
感謝nitzmahone。我更新了我的問題。此選擇查詢使用「無鎖」表提示。 – mkus 2010-01-08 09:31:50