问题描述
我正在使用 .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net 来开发 ASP.Net Web 应用程序.
I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application.
我的问题是,如果我在 SQL Server 身份验证模式下使用 Asynchronous Processing=true
(不是 Windows 身份验证模式,即在 web.config 的连接字符串中使用 sa 帐户和密码),我是想知道 Asynchronous Processing=true
是否会影响我的 Web 应用程序的性能(或取决于我的 ADO.Net 代码实现模式/场景)?为什么?
My question is, if I am using Asynchronous Processing=true
with SQL Server authentication mode (not Windows authentication mode, i.e. using sa account and password in connection string in web.config), I am wondering whether Asynchronous Processing=true
will impact performance of my web application (or depends on my ADO.Net code implementation pattern/scenario)? And why?
推荐答案
只要在你的连接字符串中有 Asynchronous Processing=True
就可以让你编写异步查询 - 我不明白如何如果您不更改任何其他内容,那么在您的连接字符串中设置该设置应该会影响您的性能.
Just having the Asynchronous Processing=True
in your connection string just simply enables you to write asynchronous queries - I don't see how having that setting in your connection string should affect your performance, if you don't change anything else.
当您开始对数据库查询进行异步处理时,您有望开始看到对性能的积极影响.但仅指定一个选项不应对您的应用产生任何(正面或负面)影响.
You will hopefully begin to see a positive effect on your performance when you start doing asynchronous processing of your database queries. But just specifying that one option shouldn't have any (positive or negative) impact on your app.
马克
这篇关于SQL Server 连接字符串异步处理=true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!