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)

Optimze perfomance for batch update to 1 million contacts in CRM

(0) ShareShare
ReportReport
Posted on by

Hello, 

We have a business need where we have to update 1 million records in CRM every month. The update requries updation of 11 fields on the Contact entity. 

We developed a console app for that and tried to do the Bulk update using Execute Multiple, but then we faced the time out issue. We tried to reduce the batch size from 1000 to 500, but it seems like it will take days to update 1M records. 

The maximum time we have to run the batch job is 5 hours. I need to know what is the best practice or solution to perform this operation. Do we need any third party tool, or we can modify and optimize our console app to run the operations fast. 

Need expert advise here. 

Thanks, 

Fahad

*This post is locked for comments

I have the same question (0)
  • JayeshAC Profile Picture
    1,157 on at

    Hi Fahad,

    Which version are you using - CRM online or OnPremise?

  • Friyank Profile Picture
    944 on at

    instead of Console try powershell script.  

  • Community Member Profile Picture
    on at

    CRM 2016 on-Premise

  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    if you are onpremise you can definitely optimize your console application.

    The ideal will be to read first all your CRM records (and because you are onpremise you can use the SQL filtered view, it should speedup the process.

    After you compare in memory the actual changes you need to update, you wrote about 11 fields, probably these 11 fields do not change always all and not for all the contacts, so when you update a contact you need to be sure that it requires to be updated (so you don't update a contact that had no changes) and just update the changed fields (for example 3 fields of 11)

    hope it helps

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Fahad,

    when you have to deal with millions of records you have to forget about standard CRM Service.

    Although it is not supported, go straight to SQL Server doing a lot of testing in a cloned environment (using SSIS, console application or commercial software like Scribe).

    In the past, when I worked hard on OnPremise environments, I did it without any issue (console application).

    Hope it helps.

    If you found the answer helpful, please mark as Verified 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY.

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    JayeshAC Profile Picture
    1,157 on at

    Hi Fahad,

    If you want to update millions of records then better option would be using SQL scripts instead of CRM API.

    Though it is not recommended but it will solve your problem and update million of records in few minutes.

    Click on below link to know more details about calling SQL script.

    community.dynamics.com/.../207020

    Regards,

    Jayesh

  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    direct update of SQL records is not supported, people should stop to suggest this approach

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