Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

Deleting records from large tables to reduce DB size

(0) ShareShare
ReportReport
Posted on by 5

Hi!

So, I am on a project with a client where we have been tasked to reduce the size of their huge test environment. We have identified and utilized a large part of the standard out of the box features that Microsoft provide, as to clean up and archive/delete data. 

However, we are still not a satisfying level in terms of DB size. 

I have been spending hours and hours reading through blog posts, google search, learn pages and more, to find best practice in terms of reducing DB size further. We have also deleted via SQL in the backend, but that has caused some functional issues, so we have been sort of going away from that..

So... What are some really good practices for this? Surely it must be an increasing problem, as costumers use up more and more of their DB size.

Picture below of some of the top sized tables that we are focusing on. 

pastedimage1683035522585v1.png

Any advice, link, use-case, etc., would be highly helpful! :-)

Br, 

Oscar Felfel

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,575 Super User 2025 Season 1 on at
    RE: Deleting records from large tables to reduce DB size

    Hi Oscar,

    Preferrable, I would suggest waiting for the preview and check how Microsoft ensures consistency. For a current inventory transaction archival options (copy to another table), Microsoft replaces a large number of records with a summary record.

  • Oscar_Felfel Profile Picture
    Oscar_Felfel 5 on at
    RE: Deleting records from large tables to reduce DB size

    Hi Andre Arnaud de Calavon

    Thanks for your quick reply.

    We have also provided those upcoming features to the client, as something to look into on the other side of the summer.

    But if we are looking at other tables, e.g., SourceDocumentLine and Costumer Tables (CustTrans, CustInvoiceTrans, etc.) how can we proceed in removing records in those?

    Is it "simply" just that you have to develop scripts and then hope that they do not hinder functionality?

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,575 Super User 2025 Season 1 on at
    RE: Deleting records from large tables to reduce DB size

    Hi Oscar,

    Microsoft announced upcoming features for archiving GL and inventory transactions. A preview will be available in several months' time. 

    Archive financial data | Microsoft Learn

    Archive inventory transactions | Microsoft Learn

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans