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 |
|
scelamko
Constraint Violating Yak Guru
309 Posts |
Posted - 2005-06-02 : 16:28:41
|
| Guys, I have data loaded from a dump file which has 10 million rows, I am trying to convert the data to new schema In the process i would have to run lot of DML statements on 10 million rows.To speed up the process 1. Do I have to neccesarily create indexes on the columns to be updated.2. Should I pin the table in the memory to the reads from the diskAny suggestions/insights would be helpful.Thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-06-02 : 16:30:56
|
quote: Do I have to neccesarily create indexes on the columns to be updated.
No that'll actually slow it down. You typically remove the indexes from the table that you are importing into, you add them back after you are done.I'd suggest BULK INSERTing the data into a staging table. The staging table would match the layout of the file. Then use T-SQL to move the data from the staging table into your new schema. Indexing the staging table after it has been imported into might be a good idea, just depends on what you need to do.Tara |
 |
|
|
|
|
|