我正在运行数据导入(使用 C#/Linq),自然而然我正在尝试尽可能地优化我的查询.为此,我使用 SQL Server Profiler 在数据库上运行跟踪,我的跟踪按我的 SQL 登录名过滤(这是一个可以唯一归因于我的数据导入过程的名称).
I'm running a data import (using C#/Linq), and naturally I'm trying to optimize my queries as much as possible. To this end I'm running a trace on the DB using SQL Server Profiler, with my trace filtered by my SQL login name (it's a name that can uniquely be attributed to my data import process).
奇怪的是,我的大部分 SQL 语句都非常快:) - 很少有查询甚至超过 1 毫秒标记.但是在我所有的查询之间有几行,其中 EventClass 是审核登录"或审核注销" - 并且审核注销"的持续时间可能长达一分钟!
Strangely enough, most of my SQL statements are really quick :) - very few queries even break over the 1ms mark. But spaced in between all my queries are several rows where the EventClass is "Audit Login" or "Audit Logout" - and the duration of an "Audit Logout" can be up to a minute!
这与我在导入中使用事务有关吗?如果是这样,有什么方法可以找到哪些是热门查询,以便我可以清理它们?
Has this got something to do with the fact that I'm using transactions in my import? If so, is there any way to find which are the big-hitting queries so I can clean those up?
如果我没记错的话,审核注销的持续时间就是连接打开的时间.例如.与命令的速度无关 - 只是登录登录"的时间.
If I remember correct, the duration of an Audit Logout is the amount of time the connection was open. E.g. nothing to do with speed of the command - just the amount of time the login was 'logged in'.
这篇关于什么是“审核登出"?在 SQL Server Profiler 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!