SQL Server 2000 的简单性能指标
我使用(和更新)的报告需要很长时间(有些需要几个小时)。 我觉得这太长了,之前就问过这个问题。 在浏览了各种讨论 SQL 性能的网站后,他们都采取了 DBA 的立场。 然而我不是,我的同事也不是(我想如果我们有 DBA 那么我们就不会有这个问题)。
我想要的是一种简单的方法来返回前 10 个左右运行最多和性能最差的脚本。 我希望有一个很好的 SET METRICS ON 开关,但我想如果是这样的话,那么网站就不会继续记录配置文件。
我最不想做的就是导致性能进一步下降,而记录配置文件听起来像是性能杀手。
The reports that I use (and update) are taking a long time (some take hours). I felt this is far too long and asked previously about this. After taking a long look at various web sites that discuss SQL performance, they all take the stance of being DBA's. However I'm not, and neither are my colleagues (I guess if we had a DBA then we wouldn't have this problem).
What I want is a simple way of returning the top 10 or so most run and worst performing scripts. I would of hoped there is a nice SET METRICS ON switch, but I guess if that was the case then the sites wouldn't go on about recording profiles.
The last thing I want to do is to cause performance to drop even further and recording a profile sounds like a performance killer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您至少有以下选择。
最后,自动化工具将为您带来很大帮助。 对于您的情况来说,这甚至可能已经足够了,但请记住,没有任何自动化工具能够胜过熟练的 DBA,因为自动化工具无法重写您的查询。
You have at least following options.
In the end, automated tools will get you a long way. It may even be enough in your case but keep in mind that there is no automated tool that will be able to outperform a skilled DBA for the mear fact that automated tools can not rewrite your queries.
您应该能够浏览 sys.dm_exec_query_stats 表,该表保存有关数据库的所有查询的信息。
为您提供有关历史查询所花费时间的基本计时信息。
You should be able to go thru the sys.dm_exec_query_stats table, which keeps information on all queries against a database.
Gives you basic timing information of how long, historically, queries took.