How GUID.NewGuid(); affects CRM performance?


Recently I read this interesting article which explains how CRM uses sequential GUIDs for performance and recommends that users creating a record in CRM using SDK message, either in plugin or workflow should use the create GUID service instead of using System.Guid.NewGuid().

Microsoft Dynamics CRM SDK Best practices for developing with Microsoft Dynamics CRM, states, “Allow the system to automatically assign the GUID (Id) for you instead of manually creating it yourself”. This suggestion allows Microsoft Dynamics CRM to take advantage of sequential GUIDs, which provide better SQL performance.

A plugin or an application that needs to create records in CRM using the SDK populate the record’s ID with GUID generated using System.Guid’s NewGuid method. The System.Guid’s GUID does not generate a sequential GUID which affects the performance.

Detaild explanation provided in below link. Thanks!

http://blogs.msdn.com/b/crminthefield/archive/2015/01/19/the-dangers-of-guid-newguid.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s