SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Is derived column better for performance of a package ?


Is derived column better for performance of a package ?

Author
Message
Randy Knight
Randy Knight
SSC-Enthusiastic
SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)

Group: General Forum Members
Points: 120 Visits: 155
rhythm.varshney (11/13/2012)

Yes, actually if you see my comments I mentioned that I am performing UPINSERT logic on the basis of staging table which hold around 50 K records daily basis.So was thinking to handle the split on the same.As was having the staging table and did not want to insert derived columns additionally.But not sure about the performance.


I would still use the data flow for the inserts. Do a conditional split to a staging table with just the rows that need to be updated and go ahead and do your inserts in the pipeline. Then you can use an Execute SQL Task to do a set-based update. The alternative would be an OLE DB Command to do your updates but that will be RBAR. So this is one case where a staging table makes a lot of sense.
rhythm.varshney
rhythm.varshney
SSC Veteran
SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)SSC Veteran (236 reputation)

Group: General Forum Members
Points: 236 Visits: 195
Randy Knight (11/13/2012)
rhythm.varshney (11/13/2012)

Yes, actually if you see my comments I mentioned that I am performing UPINSERT logic on the basis of staging table which hold around 50 K records daily basis.So was thinking to handle the split on the same.As was having the staging table and did not want to insert derived columns additionally.But not sure about the performance.


I would still use the data flow for the inserts. Do a conditional split to a staging table with just the rows that need to be updated and go ahead and do your inserts in the pipeline. Then you can use an Execute SQL Task to do a set-based update. The alternative would be an OLE DB Command to do your updates but that will be RBAR. So this is one case where a staging table makes a lot of sense.



That is the case I can not use set based approach as updates may be on different columns and with different pattern and so.Hence will have to use RBAR. So what would be the recommendation for my requirement i.e. I need to process 50K records daily basis from an excel to database table and I need to use UPINSERT logic along with few splits on certain columns.
So far I used a staging table for this and handling both on the same.However looking for better approach like derived column transformation or else but at the same time do not want to increase overhead on SQL engine.
Randy Knight
Randy Knight
SSC-Enthusiastic
SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)

Group: General Forum Members
Points: 120 Visits: 155
You can do everthing you want to in the data flow. Conditional split to separate the inserts and updates, and if you truly do need to do your updates RBAR then an OLE DB Command for those.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search