简体   繁体   中英

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

We have CRM NAV on premise. We have lot of performance issue. We do get 40-50 messages per day regarding waring for query Execution times in application log.

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. Thread: 148; Database: MSCRM; And query itself.

But when we run that query it takes no time in SSMS OR may be 1 or 2 seconds.

Why there is a big difference in terms of time running the query from CRM and directly on SSMS. ?

Do you think we should rebuild or reorganize indexes anyway to improve performance ?

Thanks. 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. 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?

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.

Creating and de-fragmenting indexes on the CRM database are supported operations. Microsoft recommends that indexes with a fragmentation level greater than 30% be rebuilt, while those with greater than 10% fragmentation should be reorganized.

Defragmenting your production indexes is perfectly safe but you should run the operation overnight to minimize any affect on system performance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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