web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Query using about 30% of the SQL Server

(0) ShareShare
ReportReport
Posted on by

Hi friends,

I have a query that it take 30% of total instance execution time on SQL Server. Do you know what is it?

SELECT StatMan([SC0]) 

FROM
(
SELECT TOP 100 PERCENT [Primary Key] AS [SC0]
FROM [dbo].[Company$Change Log Entry]
WITH
(
READUNCOMMITTED
)
ORDER BY [SC0]
) AS _MS_UPDSTATS_TBL

With thanks for whatever assistance you might provide. 

 

Kind regards,
Johonnatan Zuin

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    I think you have change log enabled on your navision database and there is a maintenance plan setup on the SQL Server and normally one task of the maintenance plan would be update statistics, so in this case it is trying to update that on the change log entry table.

    Since the change log entry table can grow big based on how you setup it is taking time to build statistics on it.

  • Suggested answer
    Community Member Profile Picture
    on at

    Yes, that's correct. I have change log enabled on Dynamics and SQL maintenance plan to update statistics running daily at 01:00 am and also enables "Auto Update Statistics" on database.Statistics comes with a cost, but can make the optimizer’s job more difficult. In your opinion, is it redundant? Should I increase the time this plan?

  • Verified answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    I think you don't need to run the update statistics every day you can change that to run only once for week and i think there are different ways to update the statistics, so choose which one is best for you. (I am not an expert in this).

    Maintenance plan is very important to include transaction and full backup of database and re-organizing indexes, so try to run this plan every day.

    dynamicsuser.net/.../86681.aspx

    Please check the above link for more information.

  • Verified answer
    Community Member Profile Picture
    on at

    Thanks for your help. I'll check my maintenance plan on SQL Server.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans