Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Performance issue saving data to custom entities - on prem 2016 CRM (Create and ExecuteMultiple)

(0) ShareShare
ReportReport
Posted on by 5

Hello

I have recently been put in charge of a custom built ASP.Net system which uses CrmServiceClient to perform some work on  2 custom entities. Our CRM is on-prem in a VM. Sql server is on another VM.

These entities are rather simple,  a simple hierarchy - parent->child one level  - 1 to many relationship, nothing fancy, no plugins, no custom workflows, no events.

You could says that these entities are only used for data storage,. in CRM the parent entity has one standard main Information form and a view on it  for a list of child entities.

Lately  we've been experiencing a huge slowdown when trying to insert more than twenty rows at the time through _client.Create.  I firsrt blamed the ASP.Net app and optimized the code,

but it made no difference. Then I asked a colleague to monitor server and the VMs for abnormal load when i execute insert operations and there was no notable increase in load. On CRM machine one CPU core of 8 was peaking at like 60 % and no memory spikes. Neither SQL server and its VM showed any signs of struggle.

So I'v changed the code again in ASP.Net app and instead of create each child row one by one, I  ran with ExecuteMultiple request passing in about of three hundred child rows of data.

That , amazingly, did nothing at all... It takes approximately 5 minutes to insert 300 rows   either via _client.Create  or ExecuteMultiple.   And what's more interesting it take about 5-6 minutes to delete them through CRM's own interface  via parent entity form , clicking "Delete"...

Right now I am clueless...  

  • DmitriyP Profile Picture
    5 on at
    RE: Performance issue saving data to custom entities - on prem 2016 CRM (Create and ExecuteMultiple)

    Hello

    Thanks for your reply,   but  I've tried that.

    I have measured time it takes for 300 rows, and divided by 300 to get  time per row, which is  approximately 1.4 seconds

    When I reduce ExecuteMultiple request size to any number of rows (200,150,100)  it still takes the same amount of time per row.

    Redards

    D

  • Pradeep Rai Profile Picture
    5,487 Super User 2025 Season 1 on at
    RE: Performance issue saving data to custom entities - on prem 2016 CRM (Create and ExecuteMultiple)

    Hi,

    Can you please try by reducing the batch size from 300 to 100 rows or less?

    Thanks,
    Pradeep.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Product updates

Dynamics 365 release plans