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 :
Finance | Project Operations, Human Resources, ...
Answered

Inventtrans cleanup

(0) ShareShare
ReportReport
Posted on by 42

Hi all

Our AX 2012 R3 system has been running for about 3 years. The Inventtrans table has grown immensely . I have ran the on-hand entries cleanup but it does not really make a difference. 

Is there any other way to shrink the rows in this table (it is sitting over 9mil)

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Do you experience some issues because of the size of the table?

    9 million doesn't sound huge.

    Are you planning to upgrade to D365 in the coming years? If yes, you could just leave old transactions behind in the upgrade, and migrate only master data and opening balances to D365.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Neilb22,

    The inventtrans table is a table that you should almost never touch because a lot of things depend on those transactions.

    Unless you see a huge performance issue, I would recommend not trying to do any kind of cleaning, correction or something else because it is one of the main / central tables in AX.

    Best regards,

    Ludwig

  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Neilb22,

    A small additional comment to the important notes already given above. The Inventory transactions are referenced throughout the system. When you perform a consistency check, it will verify the InventTrans table with the InventSum table. When you delete records, you cant use the consistency check anymore and an option to repair the InventSum table in case of emergency is lost.

  • Neilb22 Profile Picture
    42 on at

    Yes we are experiencing some performance issues on some SQL reports linked to the inventtrans table. The 'inner join' is processing to many lines and it causes some reports to run over an hour

  • Verified answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Neilb22,

    Are the reports that face those performance issues standard reports or customized ones?

    If they are customized ones, you might probably be able to check and 'tune' the way how they extract the data.

    Alternatively, you can use BI tools for analyzing those inventory data.

    Best regards,

    Ludwig

  • Neilb22 Profile Picture
    42 on at

    Hi Ludwig , it is custom reports. I believe you are right I need to tune the query or try and run it through BI

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    I also agree that you need to take a look at your reports, queries and indexes.

    If your report is slow, the first approach should not be to delete data from the system :)

  • TheGoodDBA Profile Picture
    235 on at

    Here is a checklist for poor performing reports in AX:

    Start by analyzing the query:

    1. Do the joins in the query make sense?

    2. Are all of the table in the query resulting in index hits when executed, or are there table scans?

    3. Are there missing indexes requested by the index advisor? If so, evaluate the difference.

    Are the reports written in best practice?  

    1. Query returns filtered results, not using the report to filter the results, when avoidable.

    2. Should the report be converted to RDP if query is expensive?

    These should send you down the right path.  Chances are high the 9 million rows in InventTrans is not your performance problem.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans