March 6, 2009 at 2:16 pm
select distinct lastname,fisrstname, titile,cellphoneno , officeno from tableone
union
select distinct lastname,fisrstname, titile,cellphoneno , officeno from tabletwo
then i have a "sort transformation" that order by lastname,fisrstname, titile
and remove duplicate. after sort transformation i have "lookup" and "drive transformation" and ofcource "OLE DB destination"
that uses all the coulmn from the source (lastname,fisrstname, titile,cellphoneno , officeno)
the "sort transformation" is taking forever and degradeding the perfomace of my packages . i was wondering if there is way i can
remove sort transformation.
March 6, 2009 at 2:22 pm
Is your source SQL Server?
If it is then you should not have any duplicates in that query as you are returning DISTINCT rows from each part of the UNION operation and the UNION removes any duplicates.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 6, 2009 at 6:10 pm
Further to Jack's post, the UNION also forces a sort - so you can remove your sort transformation completely and change your query to:
select lastname, fisrstname, titile, cellphoneno , officeno from tableone
union
select lastname,fisrstname, titile, cellphoneno , officeno from tabletwo
Should speed things up quite a bit.
PS do you really have a field called 'titile'? 😛
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply