简体   繁体   English

MMS的Profiler / Fast中的慢查询执行

[英]Slow Query Execution in Profiler/Fast in MMS

I made an DB auditing to sort out some performance problems one customers has in a part of our software. 我进行了数据库审核,以解决客户在我们软件的一部分中遇到的一些性能问题。 I used the profiler to look for the queries that were taking too much time. 我使用探查器来查找花费太多时间的查询。 Minutes later i saw the selects that were taking sooo long to execute (up to minutes). 几分钟后,我看到执行选择所花的时间太长(最多几分钟)。 As usual i took the selects and let them execute in the management studio to search for missing or bad indexes (execution plan). 像往常一样,我接受了选择,然后让它们在管理工作室中执行以搜索丢失或不良的索引(执行计划)。 Then the shock they are blazing fast (milliseconds) and use good indexes. 然后震惊的是他们飞快地(毫秒)并使用了良好的索引。 Now my guess was a locking problem but to my surprise the select has the nolock on both tables marker.... Networkproblems seem not to be the hickup here since i have good times from different clients on other selects (the slow selects come from different clients). 现在我的猜测是一个锁定问题,但令我惊讶的是,选择在两个表的标记上都处于锁定状态。...网络问题似乎不是这里的问题,因为我在其他选择上来自不同客户的情况很好(缓慢的选择来自不同的选择客户)。 Just to be sure i maintained the indexes on the 2 inner joined tables used in this select without any success. 只是要确保我在此选择中使用的2个内部联接表上维护了索引,但没有成功。 Other selects with those tables don't have those horrible times. 这些表的其他选择没有那么糟糕的时间。 edit: so my not so clear question is what steps should be taken to further look for the problem? 编辑:所以我不清楚的问题是应该采取什么步骤来进一步查找问题?

Several questions to answer: 要回答的几个问题:

  • is your test environement the same as the productive (customer) environment? 您的测试环境是否与生产(客户)环境相同?
  • What is the difference between test and prod. test和prod有什么区别。 Environment (eg DB Stats) 环境(例如数据库统计信息)
  • Do you know of concurrent processes running at customer site? 您知道客户现场运行的并发流程吗?
  • What about the table volumes (number of records)? 表卷(记录数)呢?
  • Key definitions and indexes OK ? 键定义和索引好吗?
  • and many more steps you could take but start with these ones 您可以采取更多步骤,但从这些步骤开始

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM