Search code examples
dynamics-crmdynamics-crm-2011crmfetchxmlquery-expressions

Writing Native SQL for CRM 2011


I wonder about that can I write native SQL to add or delete operations instead of using Query Expression or FetchXML etc. I know Query Expression is very useful but my real concern is performance and I've thought writing SQL can be faster than the others.


Solution

  • To put it simply, using direct SQL (especially for create/update actions) is not supported. DO NOT DO IT!

    The database model for CRM is complex and updates to data can have effects that extend beyond a simple update to a single table or two.

    my real concern is performance

    Have you validated this concern? Take a look at this link which documents performance tests on CRM. This is an enterprise-level, scalable platform. If you have proven performance issues then perhaps your code needs optimising or your kit needs beefing up...? :)