tsql - SSIS union all vs sql server Union All -
i use sql server 2012 , ssis. have 2 tables in same server , same database. need transfer records of both tables third table.
i need add columns (like execution id , package parameters) result of union , after have transfer records third table.
i have 2 solution doing don't know ones more efficient.
solution 1 : use 2 ole db datasources , use union component in ssis
solution 2 : use union all in sql server side , use 1 ole db source in ssis.
which 1 more efficient?
always favor database operations when possible. if 2 tables in same database, there absolutely no reason favor ssis operation on query optimizer. union no blocking operation, there no difference in case, if join or more complex operation query optimizer come play.
use database solution rule of thumb.


Comments
Post a Comment