简体   繁体   English

对于SSIS,表视图或条件拆分,哪个更快?

[英]Which is faster for SSIS, a View on a table or a Conditional Split?

I have an SSIS project where one of the steps involves populating a SQL Server table from an Oracle Table. 我有一个SSIS项目,其中一个步骤涉及从Oracle表填充SQL Server表。

The Oracle table has a column ssis_control_flag . Oracle表具有ssis_control_flag列。 I want to pull across all records that have this field set to 'T'. 我想查看所有将此字段设置为“ T”的记录。

Now, I was wondering which would be the best way of doing this, and the two options as I have detailed in the question presented themselves. 现在,我想知道哪种方法是最好的方法,而我在问题中详细介绍的这两个选项是自己提出的。

So really, I am wondering which would be faster/better. 所以,确实,我想知道哪种更快/更好。 Should I create a conditional split in the SSIS package that filters off all the records I want? 是否应该在SSIS包中创建条件拆分以过滤掉我想要的所有记录? Or should I create a view in Oracle that selects the records based on the criteria, and utilise that view as the data source in SSIS? 还是应该在Oracle中创建一个根据条件选择记录的视图,然后将该视图用作SSIS中的数据源?

Or is there an even better way of doing this? 还是有更好的方法呢? You help would be much appreciated! 您的帮助将不胜感激!

Thanks 谢谢

Why don't you use a WHERE clause to filter the records, instead of creating a view? 为什么不使用WHERE子句来过滤记录,而不是创建视图? May be I am not getting your question correctly. 可能是我没有正确收到您的问题。

Then in general, bringing all the data to SSIS and then filtering out is not recommended. 然后,通常不建议将所有数据带到SSIS,然后再过滤掉。 Especially when you can do the filtering at the source DB end itself. 尤其是当您可以在源数据库端本身进行过滤时。 Consider the network bandwidth costs as well. 还应考虑网络带宽成本。

Then this particular filter that you are talking about here, cannot be done with a better efficiency in SSIS than that can be done at DB. 然后,您在这里谈论的这个特定的过滤器在SSIS中无法比在DB处实现的效率更高。 Hence better do it in the Oracle DB itself. 因此,最好在Oracle DB本身中执行此操作。

您可以使用将openrowset用作数据流源的查询,而不用直接访问Oracle表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM