Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

Anatomy of an Incremental Load Expand / Collapse
Author
Message
Posted Thursday, January 24, 2008 8:16 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 2:46 PM
Points: 388, Visits: 1,047
Comments posted to this topic are about the item Anatomy of an Incremental Load

Andy Leonard
CSO, Linchpin People
Follow me on Twitter: @AndyLeonard
Post #447281
Posted Saturday, January 26, 2008 9:37 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:23 PM
Points: 7,178, Visits: 15,763
Nice in-depth article.

Just curious - do you have any metrics as to how efficient this is? DTS has gotten a black eye in the past as to being less performant than more streamlined tools like bcp or bulk insert, and SSIS seems to be getting hit with it just by being its replacement. The process you're describing seems to be very efficient process-wise; I just don't have anything that big to load up these days to get an idea of how well this behaves?

Never mind for now the ease of setting this up - I can see how much faster it would be to set one of these up than the "manual way"...


----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Post #447944
Posted Saturday, January 26, 2008 2:53 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 2:46 PM
Points: 388, Visits: 1,047
Thanks Matt!

I don't use DTS (or competing products) enough these days to speak about how SSIS performs when compared to them. I can tell you:

1. In general SSIS is way faster than DTS. In tests I did with the Beta versions of SSIS I saw a typical 20% - 40% performance boost. When coupled with an upgrade from SQL Server 200 to 2005, I saw those numbers increase even more. SSIS gives you more and different options for piping data through the enterprise so it is possible to achieve much better performance.
2. Staging updates makes a measurable impact in incremental loads compared to using the OLE DB Command.

:{> Andy


Andy Leonard
CSO, Linchpin People
Follow me on Twitter: @AndyLeonard
Post #447976
Posted Sunday, January 27, 2008 9:21 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:23 PM
Points: 7,178, Visits: 15,763
Cool! I will have to see if I can run the next "big one" I get this way to get a feel, but it sounds like performance has definitely been improved.

Thanks!


----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Post #448045
Posted Monday, February 11, 2008 2:49 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 3:09 AM
Points: 1, Visits: 43
Hi Andy,
one case is missing in your article: deleted rows (rows in the database but no longer in the input data).
And just another question: do you really think that comparing the whole data between two tables is faster then truncating a table and reloading it complete (if you have a time windows for doing this, of course)?
Until now, I have such a time window but after reading your article I think about loading data by your way, because it is the best way to have all data 24x7 online.
Thanks a lot.

Rainer kroos
Post #453758
Posted Monday, February 11, 2008 4:15 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 3:06 AM
Points: 54, Visits: 249
just a wee thought on this article. Surely what you are talking us through here is the same as is accomplished by the Slowly changing dimension 'box' . Which automagically creates all the tsql to do the updates,additions and deletions. With support for keeping a history of changes.

It's quite a mad one but a bit of reading up on slowly changing dimensions really helps! :)
Post #453775
Posted Monday, February 11, 2008 4:33 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, March 8, 2013 10:18 AM
Points: 47, Visits: 165
Good introduction to SSIS! One thing you wrote surprised me: that using a select statement would be faster than using a view. I don't understand why this is the case.

Since you promised that this would be the first of a collection of articles on SSIS, I would like you to address a situation in which either the input or the output is not SQL Server. For my own purposes, I would like a demonstration of how to handle output to another database such as DB2 or MySQL.

Thanks for a nice article.

Arthur


Arthur Fuller
cell: 647-710-1314

Only two businesses refer to their clients as users: drug-dealing and software development.
-- Arthur Fuller
Post #453784
Posted Monday, February 11, 2008 6:19 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 2:46 PM
Points: 388, Visits: 1,047
Great comments!

Rainer: Deleted rows can be correlated with a Right Join instead of a Left Join, and Filtered the same as New Rows. For the Delete action I stage the rows (much like the Updates) and run a set-based query after the Data Flow.
I do believe loading incrementally is faster than than truncating and reloading in any database that is scaling, or is of sufficient size and experiencing a certain threshold of changes (this is my way of quoting Andy Warren: "It Depends" ;)).

Surely what you are talking us through here is the same as is accomplished by the Slowly changing dimension 'box' .


Yussuf: Yep - it's a lot of the same stuff accomplished with the SCD transformation (optimized some). Unless you're familiar with the concepts of ETL for Kimball-based databases, the SCD Wizard can be a bit intimidating. You essentially work through the same thought process you would work through here, but it looks different to the first-time developer. I would say the converse is more accurate: "the SCD is a very cool wrapper for incremental loads."

...using a select statement would be faster than using a view.


Arthur: Gosh I hope I didn't say that. If I did, forgive me. I argue against selecting a Table or View by name from the dropdown in the same way I argue against writing T-SQL with "Select *..." at the beginning. Extra lookups take place for column names and the like when you execute "Select *". The same applies in SSIS which is, after all, executing SQL against the database.

:{> Andy


Andy Leonard
CSO, Linchpin People
Follow me on Twitter: @AndyLeonard
Post #453808
Posted Monday, February 11, 2008 6:29 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 8:32 AM
Points: 4,631, Visits: 1,905
yussuf.khan (2/11/2008)
just a wee thought on this article. Surely what you are talking us through here is the same as is accomplished by the Slowly changing dimension 'box' . Which automagically creates all the tsql to do the updates,additions and deletions. With support for keeping a history of changes.

It's quite a mad one but a bit of reading up on slowly changing dimensions really helps! :)


In my experience the SCD is not very efficient once you get above a thousand rows or so. As the name implies, the SCD is targeted at tables that do not change often, and dimension tables are typically on the small side. It works great and I've used it, but in the right situations. Andy's approach probably scales a lot better.

Nice article Andy!



Post #453812
Posted Monday, February 11, 2008 6:32 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:56 AM
Points: 10,380, Visits: 13,434
This may relate a littel to Arthur's comment about loading to another RDBMS or from another RDBMS or even another server. If you are loading from a system that you cannot join between the source and destination tables would you use a lookup, then the conditional split, or stage all the data in SQL Server and then load into the destination using the method you show here?



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

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
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #453814
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse