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

History Data Comparision Expand / Collapse
Author
Message
Posted Wednesday, July 17, 2013 3:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 18, 2013 1:11 AM
Points: 7, Visits: 10
Question :1 Server : sql server 2008 R2 a) I have "prestaging" table as source table. b) I kept working table and History table as other set. c) The data from "prestaging" tables will move to both "working tables" and "History tables". d) The working table record have few validation is there after validated then all the successful record will move to the "TARGET" table. d) There is possibility of the old data can get amended from source system and then they will send the amended record in the "Prestaging tables " with the UNIQUE no column as primary key. d) Before inserting in to target table I need to compare the history table if the same record is appearing again based on the unique column then I need to Update "Modeflag" column as update record else the record will be send as "Inserted" d) There is possibilities of comparison of history table will have more than 500000 of records. d) Currently we are comparing with inner join with UNIQUE no as clusterered index column and then updating the mode-flag .

we required best possibilities way to avoid performance issue to handle this situation . Kindly provide the best solution to compare the history record .

Note : The history table will grow like anything in upcoming years.

Note :THE BOVE ALL LOGIC WRITTEN ON ONE STROED PROCEDURE AND THEN SQL JOB WILL EXECUTE ON EVERYDAY.
Post #1474464
Posted Wednesday, July 17, 2013 3:24 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Thursday, December 18, 2014 12:52 PM
Points: 13,636, Visits: 11,509
Please do not crosspost. It wastes peoples time and fragments replies.
Original thread with replies can be found here:
http://www.sqlservercentral.com/Forums/Topic1474405-148-1.aspx




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1474467
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse