加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

sql-server-2008-r2 – SQL Server“Audit Logout”操作需要很长

发布时间:2020-12-12 16:51:29 所属栏目:MsSql教程 来源:网络整理
导读:我们有一个存储过程,每天由15个用户每天调用约30万次.我已经倾注了每一行,它是有效率,我可以得到它. 存储过程通过基本的Winterms上的遗留VB6应用程序的4.0上的ASP.NET页面进行访问. 当我查看SQL跟踪文件时,我看到以下内容: exec sp_reset_connection(使用连
我们有一个存储过程,每天由15个用户每天调用约30万次.我已经倾注了每一行,它是有效率,我可以得到它.

存储过程通过基本的Winterms上的遗留VB6应用程序的4.0上的ASP.NET页面进行访问.

当我查看SQL跟踪文件时,我看到以下内容:

> exec sp_reset_connection(使用连接池)
>审核登录
>执行存储过程
>审核注销

我在步骤4中看到,读取和写入的方式很高,这是有道理的,因为它是在池中重用的连接的累积.

我关心的是多长时间,有时候需要50ms,其他时间400ms,完全是随机的.从文档中我看到“审计注销”是整个三个步骤的持续时间.但是步骤1-3非常快,像0-5ms.为什么“审计登出”的持续时间要长呢?

解决方法

我现在“处理”一个类似的问题,偶然发现
帖子: http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/84ecfe9e-ff0e-4fc5-962b-cffdcbc619ee

也许这个(上面提到的帖子)是解决方案:

“One error in my analysis has been identified. When a connection is pulled out of the pool,the server is sent a sp_reset_connection. That reset invokes an audit_logout followed by an audit_login. The next audit_logout doesn’t occur until the next time the connection is pulled out of the pool… so the long intervals I am seeing include the time the application processes the results of a query,releases the connection to the connection pool,does whatever,and finally pulls the connection back out of the pool to start the next transaction.”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读