SQL Server Integration Services (SSIS) 每次运行时都会重新编译 C# 代码吗?

发布于 2024-08-19 21:37:27 字数 324 浏览 2 评论 0原文

我们有一个实时获取数据并将记录添加到数据库的流程。我们使用 SQL Server 2008 Integration Services 来运行提取转换加载 (ETL) 过程。我们从 FTP 站点下载大约 50 个文件,对其进行处理,然后将文件存档。

问题是每个文件的处理时间大约为 17 秒,即使文件非常小(大约 10 行)并且处理代码相当简单。查看机器上的负载,它受 CPU 限制,并且网络、磁盘或内存上没有太多流量。

我怀疑 SSIS 可能会在每次运行时重新编译 C# 代码。有人遇到过类似的问题吗?或者您使用过类似的过程没有出现问题吗?

是否有任何工具可以让我们分析 dtsx 包?

We have a process that is getting data in real time and adding records to a database. We're using SQL Server 2008 Integration Services to run our Extract Transform Load (ETL) process. We download about 50 files from an FTP site, process them and then archive the files.

The problem is that the processing is taking about 17s per file even thought the files are really small (about 10 lines) and the processing code is fairly simple. Looking at the load on the machine it is CPU bound and there are not a lot of traffic on the network, disc, or memory.

I suspect that SSIS might be re-compiling the C# code every time it is run. Has anyone run into similar problems? Or have you used a similar process without problems?

Are there any tools that can allow us to profile a dtsx package?

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

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

发布评论

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

评论(2

吾家有女初长成 2024-08-26 21:37:27

由于您使用的是 SSIS 2008,因此您的脚本任务始终是预编译的。

Since you're using SSIS 2008, your Script Tasks are always precompiled.

魂ガ小子 2024-08-26 21:37:27

您确定这是脚本任务吗?

我有一些广泛的脚本任务,这些任务构建了许多字典,根据疯狂复杂的业务逻辑查看传入值是否在各种字典中,并进行翻译或其他工作。在任务初始化中而不是在每行方法中构建一次字典,处理过程将得到极大改善,正如您所期望的那样。但这是一个非常特殊的例子。

包组件将被验证(在每个控制流组件运行开始时或之前),这是您无法避免的一些开销。

您是否在 SSIS 中的单个循环中处理所有文件?在这种情况下,不应重复数据流验证。

Are you sure it's the script task in the first place?

I had some extensive script tasks which built many dictionaries, saw if an incoming value was in various dictionaries according to crazy complex business logic and did a translation or other work. Buy building the dictionaries once in the task initialization instead of on the each row method, the processing improved vastly, as you might expect. But this was a very special case.

The package components will be validated (either at the beginning or right before each control flow component is run), that's some overhead you can't get away from.

Are you processing all the files in a single loop within SSIS? In that case, the data flow validation shouldn't be repeated.

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