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 |
naren.suggul
Starting Member
3 Posts |
Posted - 2008-03-14 : 04:14:23
|
among the two below, which is faster for bulk random data? and why?create index(es) on table and the insert data insert data into table and then creating index(es) |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-03-14 : 09:50:25
|
you should insert data into table and then creating index(es) |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-03-14 : 23:10:44
|
Depends (yes, you see that again). If table has clustered index only and data file is sorted with index column, create index first. Since creating index on empty table takes no time, and all data are appended. |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-03-15 : 01:54:37
|
But he is talking about bulk-insert. |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-03-15 : 16:11:05
|
I'm talking about bulk insert to empty table too. |
|
|
|
|
|