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 CRM (Archived)

Best practice: deleting 30 Million annotation records

(0) ShareShare
ReportReport
Posted on by 482

We are planing to delete 30 Million annotation records from our production DB. For that we wrote the SP to update the deletionstatuscode=2 and and hand over to crm system to delete it from there end.

Is this this the right way to delete the records from CRM?

How log will it take to perform this update task?

while doing async delete by crm service what time and cpu resources will get consumed?

will CRM async service will take care for use of CPU resource?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Royal King Profile Picture
    27,686 on at

    I would create  multiple bulk delete job with created on date of record to group deletion based on like created on year  to delete these many records and let system take care of all the resource handling.

  • Suggested answer
    Bruno Lucas Profile Picture
    5,421 on at

    Bulkdelete is the best approach.

    msdn.microsoft.com/.../gg334418.aspx

    maybe you can create 1 reoccurring bulkdelete job and find a query that will break it in chunks so it can run on a time that will not interfere with production.

  • Community Member Profile Picture
    on at

    I would strongly advise you do not update the database directly in this (or any other) way.

    If you change the deletionstatuscode, the Deletion Service will try to delete these records and clean up after them (eg removing unnecessary rows from POA), and you have no control over how long that will take or any means to stop it if it overruns into production hours.

    Use Bulk Delete to do this, in chunks as others have suggested. Time a good sized chunk and check the impact of the async job doing the Bulk Delete and the deletion service cleaning up afterwards.

  • Suggested answer
    Hosk Profile Picture
    on at

    updating records directly on the database is unsupported and if it goes wrong Microsoft will only offer limited support.  Sometimes the system updates other related records and tables, if you do this by directly on the DB this will not happen and you could find the database is in an odd state, which might cause problems later.

    I would not advise doing this, particularly when you can do this over a number of nights using bulk delete

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans