变更数据捕获性能损失是否仅限于启用 CDC 的表?
我读到启用更改数据捕获显然会对数据库性能产生影响。 这种性能损失是否只会影响启用了 CDC 的表,还是会影响数据库中的所有操作?
在我的情况下,我正在使用 SSIS,并且有大量数据移入和移出临时数据库。我的系统中还有一些用于转换的查找表。我希望使用 CDC 作为仅审核这些引用表(而不是导入的数据)的更改的方法。我作为 ETL 的一部分运行的主要查询访问这些参考表,但不更改它们,因此我试图弄清楚是否仍然会有明显的性能影响?
谢谢
I have read that enabling Change Data Capture obviously has an impact on database performance.
Would this performance loss only affect the tables that have CDC enabled or would it affect all actions across the database?
In my situation, I am using SSIS and have a large amount of data moving into and out of a staging database. I also have some lookup tables in the system that are used for transforms. I am hoping to use CDC as a means to audit changes to these reference tables only (not the imported data). The major queries I run as part of the ETL access these reference tables but don't change them so I am trying to figure out if there will still be a noticeable performance hit?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题的答案既是肯定的,也是否定的。
不,因为
未跟踪的表似乎不参与跟踪数据。
是的,因为
由于更改的来源来自事务日志,因此更改的传播需要捕获实例读取并解释事务日志(免责声明:我对事物的解释)。仅启用 CDC 就会对整个数据库产生性能影响。
建议
结论
如果您的服务器当前在跟上其负载方面没有问题,我非常怀疑您是否会注意到为不经常更改的表启用 CDC 时出现的任何性能问题。
来源
The answer to that question would be both yes and no.
No because
Untracked tables seem not to be not involved in tracking data.
Yes because
As the source of changes come from the transaction log, dissemination of the the changes requires the capture instances to read and interprete the transaction log (disclaimer: my interpretation of things). Merely enabling CDC has a performance impact on your entire database.
Recommendations
Conclusion
If your server currently has no problems keeping up with its load, I very much doubt you'll notice any performance problems enabling CDC for infrequent changed tables.
Sources