Alex Rivera | Logout

Is it better to create an index before filling a table with data, or after the data is in place?

Asked 2010-09-10T22:12:34.243
128

I have a table of about 100M rows that I am going to copy to alter, adding an index. I'm not so concerned with the time it takes to create the new table, but will the created index be more efficient if I alter the table before inserting any data or insert the data first and then add the index?

Edit
Report

1 Answer

-3

I'm not sure it'll really matter for index efficiency's sake, since in both cases you are inserting new data into the index. The server wouldnt know how unbalanced an index would be until after its built, basically. Speed wise, obviously, do the inserts without the index.

answered 2010-09-10T22:18:36.400

Your Answer