We have a client that is using CRM against a very large database. They are experiencing slowdowns on out of the box actions, and we observe blocked SPIDs during these slowdowns. We captured the SQL generated by CRM and have a DBA analyzing that.
Our DBA may find a way to increase the performance by adjusting the SQL either in structure or optimizer hints. However, the SQL we are analyzing is under the strict control of CRM.
So here is my question…
With fetch xml is there a way to influence the structure/optimizer hints for SQL that is ultimately generated from CRM? Or if our DBA were to suggest changes to the SQL to make it faster, do we have to turn to Microsoft for a solution?
As stated by mwigdahl, there are other possibilites to tweak the database performance than to influence the generated SQL statements. These are also the only supported changes, you could do yourself.
Microsoft considers changes to the database not supported. See Supported Extensions for Microsoft Dynamics CRM:
You cannot adjust the translation of FetchXML to SQL directly. You are only able to optimize it, not including unnecessary information and so on. If you have real performance problems, I would recommend to include the CRM support in your investigations.