简体   繁体   English

CRM Nav 2015非常慢,查询执行时间超出限制

[英]CRM Nav 2015 very slow, query Execution time out of limit

We have CRM NAV on premise. 我们在内部拥有CRM NAV。 We have lot of performance issue. 我们有很多性能问题。 We do get 40-50 messages per day regarding waring for query Execution times in application log. 我们每天会收到40-50封关于在应用程序日志中查询执行时间的消息。

The warning message that we get in application log which is like 我们在应用程序日志中得到的警告消息就像是

Warning 1: Query execution time of 46.3 seconds exceeded the threshold of 30 seconds. 警告1:查询执行时间46.3秒超过30秒的阈值。 Thread: 148; 线程:148; Database: MSCRM; 数据库:MSCRM; And query itself. 并查询自己。

But when we run that query it takes no time in SSMS OR may be 1 or 2 seconds. 但是当我们运行该查询时,它在SSMS中没有时间,或者可能是1或2秒。

Why there is a big difference in terms of time running the query from CRM and directly on SSMS. 为什么在从CRM运行查询和直接在SSMS上运行查询的时间方面存在很大差异。 ?

Do you think we should rebuild or reorganize indexes anyway to improve performance ? 您是否认为我们应该重建或重组索引以提高性能?

Thanks. 谢谢。 P. P.

The most likely difference between running the report in your CRM system and running from SSMS would be the user who is executing the reports. 在CRM系统中运行报告与从SSMS运行之间最可能的区别是执行报告的用户。 Most reports are done against the filtered views which include a lot of overhead enforcing security. 大多数报告都是针对过滤后的视图完成的,其中包括许多开销强制安全性。 Executing a query with system administrator rights significantly reduces the overhead of queries against the filtered views. 使用系统管理员权限执行查询可显着减少针对筛选视图的查询开销。 Are you using a system administrator to execute from SSMS and a non administrator in CRM? 您是使用系统管理员从SSMS执行还是在CRM中执行非管理员?

Note that while unsupported, writing report queries against the regular views works perfectly fine and is MUCH faster. 请注意,虽然不受支持,但针对常规视图编写报表查询的工作完全正常并且速度更快。 Of course you lose the functionality included in the filtered views including security checks. 当然,您将丢失筛选视图中包含的功能,包括安全检查。

Indexes: Yes, you should be sure to index your CRM databases on a regular basis and defragmenting your indexes daily or weekly is even more important. 索引:是的,您应该确保定期索引CRM数据库,并且每天或每周对索引进行碎片整理更为重要。

Creating and de-fragmenting indexes on the CRM database are supported operations. 在CRM数据库上创建和解析索引是受支持的操作。 Microsoft recommends that indexes with a fragmentation level greater than 30% be rebuilt, while those with greater than 10% fragmentation should be reorganized. Microsoft建议重建碎片级别大于30%的索引,而重组碎片大于10%的索引。

Defragmenting your production indexes is perfectly safe but you should run the operation overnight to minimize any affect on system performance. 对生产索引进行碎片整理是非常安全的,但您应该在一夜之间运行操作,以尽量减少对系统性能的影响。

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

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