影响 CRM 生成的 SQL(优化器提示等)

发布于 2024-11-27 18:38:36 字数 314 浏览 1 评论 0 原文

我们有一个客户正在针对一个非常大的数据库使用 CRM。他们的开箱即用操作速度减慢,并且我们观察到在这些速度减慢期间 SPID 被阻塞。我们捕获了 CRM 生成的 SQL,并让 DBA 对其进行分析。

我们的 DBA 可能会找到一种通过调整 SQL 结构或优化器提示来提高性能的方法。然而,我们正在分析的SQL是在CRM的严格控制之下的。

所以这是我的问题......

使用 fetch xml 有没有办法影响最终从 CRM 生成的 SQL 的结构/优化器提示?或者,如果我们的 DBA 建议更改 SQL 以使其更快,我们是否必须向 Microsoft 寻求解决方案?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

游魂 2024-12-04 18:38:36

即使您无法更改 SQL,您也可以改进正在交互的物理表的索引和统计信息。如果您发现该领域的改进,则可以改进优化器生成的查询计划。

查看数据库引擎优化顾问 (DTA) - 它可以提供帮助您可以在单个查询的基础上或在工作负载分析的基础上进行这种类型的优化。

Even if you can't change the SQL, you might be able to improve the indexing and statistics for the physical tables you're interacting with. If you find improvements in that area, it can improve the query plan the optimizer generates.

Check into the Database Engine Tuning Advisor (DTA) -- it can help you with this type of optimization, either on a single-query basis or on a workload-analysis basis.

君勿笑 2024-12-04 18:38:36

正如 mwigdahl 所说,除了影响生成的 SQL 语句之外,还有其他方法可以调整数据库性能。这些也是唯一受支持的更改,您可以自己进行。

Microsoft 认为不支持对数据库进行更改。请参阅 Microsoft Dynamics 支持的扩展客户关系管理:

对数据库物理架构的修改,除了添加或更新索引。这包括在不经过系统自定义的情况下对数据库执行的任何操作。不支持修改数据库中的表、存储过程或视图。由于引用完整性或升级问题,也不支持向数据库添加表、存储过程或视图。 支持按照“Microsoft Dynamics 中的指南添加索引CRM 2011 实施指南。这适用于所有 Microsoft Dynamics CRM 数据库和 Microsoft Dynamics CRM for Microsoft Office Outlook 本地数据库。

您无法直接调整 FetchXML 到 SQL 的转换。你只能优化它,不能包含不必要的信息等等。如果您确实遇到性能问题,我建议您将 CRM 支持纳入您的调查中。

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:

Modifications to the physical schema of the database, other than adding or updating indexes. This includes any actions performed against the database without going through System Customization. Modifying tables, stored procedures, or views in the database is not supported. Adding tables, stored procedures, or views to the database is also not supported because of referential integrity or upgrade issues. Adding indexes is supported per the guidelines in the “Microsoft Dynamics CRM 2011 Implementation Guide. This applies to all Microsoft Dynamics CRM databases and the Microsoft Dynamics CRM for Microsoft Office Outlook local database.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文