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 |
|
mcrors_calhoun
Starting Member
22 Posts |
Posted - 2006-09-08 : 06:51:43
|
| Hi I have some dynamically generated SQL code that is used to load a table2 with data from table1. There can be anywhere between 10,000 rows to 1,000,000 rows in table1, though it is usually about 10,000 rows. Table1 has about 200 columns.The load takes about 10 mins(for 10,000 rows). If I output to a file instead of table2 the load takes about 2 mins.I cannot make any changes to the insert statement itself as it is embedded in some java code that cannot be changed.I need to make changes to the table to try and speed up the load process. One thing I have tried is to drop the indexes on table2 before the load and then create them again once the table is loaded. This helps, but not by enough.Is there anything else I can do to help speed things up?Cheers |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-09-08 : 08:21:27
|
| Output to a file then bulk insert that file into the table.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|