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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Should Index be recreated after delete-Import?

Author  Topic 

Mathias
Posting Yak Master

119 Posts

Posted - 2005-03-07 : 02:33:13
I have a table with all exhange rate per currency. The table is heavily used and completely deleted and reimported everyday. Should I recreate the index after the import because the whole table has changed ?
Thanks, Paul

mr_mist
Grunnio

1870 Posts

Posted - 2005-03-07 : 05:33:48
I'd go with a yes on this one.

In fact you would get better speed by dropping it before the import and remaking after.

-------
Moo. :)
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-07 : 13:20:06
Why "completely deleted" ?

Can you not "upsert"? i.e. :

1) Delete rows in Currency table NOT in import table
2) Update rows in Currency table ALSO in import table
3) Insert new rows into Currency table ONLY in import table

More of a pain to write the import routine, much less of a pain performance-wise, and no availability issues

Kristen
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2005-03-07 : 13:49:10
"Upsert". I like that Kristen! But wouldn't your example be more of a Delupsert? or maybe Inuplete?

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -