Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Use ExecuteMultiple to delete large data VS Bulk Delete

Posted on by 130

Hello,

We are using CRM online

We want to delete a large amount of data (17 millions rows) from 3 entities (with no workflows or plugin trigured)

The standard Bulk delete is taking over 2 weeks , (20 records / sec)

So we wanted to use SDK with ExecuteMultiple, (with multithreading we are limited by 2 executeMultiples)

So with that, we can double the performanace (with two executemultiple we delete 40 records/sec) (limit of 2 executeMultiples ) but that's not sufficient.

So my question is : what is the best way to delete milions of rows from CRM online  with a good performance.

*This post is locked for comments

  • Daniel Wikell Profile Picture
    Daniel Wikell 2,360 on at
    RE: Use ExecuteMultiple to delete large data VS Bulk Delete

    Hi

    One improvement that I've been using in the past is to execute the program running the deletes in Azure, either as a job or on a Azure VM. If you place your Azure resource in the same region as your CRM is running then you should be seeing a moderate performance improvement over just running the program from your own machine since it'll be closer to CRM.

    You could also try running multiple instances of your program in parallell, each working through a different part of the data and then experiment how many instances you can run at the same time without the SQL error rate going up too much.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans