Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2008-07-20 : 21:01:31
|
Hi all, I haven't been round 'ere for a while but I have a question to ask. We have a series of large reference tables (>40 million rows) that are repopulated weekly from a text file using a DTS package. The problem is that the loading takes several hours and we'd ideally like to still have access to last weeks data while this weeks load is happening. We don't have the luxury of loading during the night because the source data is normally made available Monday morning. We are trialling a new setup where we load into a separate set of tables, dropping the existing ones and renaming but this is frought with danger. I'm concerned that we will have processes or queries that will die once the tables are dropped. Any advice/suggestions would be appreciated. Cheers,Tim |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-07-20 : 21:12:18
|
Load the data into staging tables and then use T-SQL (INSERT INTO/SELECT) to move it into the actual tables. In the actual tables, you'll have last week's data in them already. You should either run a full defrag on these tables or update statistics after the import is done.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2008-07-20 : 21:16:41
|
Thanks Tara, but there will be a significant delay between the truncating and re-loading of the data. I was hoping to keep the changeover as short as possibleCheers,Tim |
|
|
|
|
|