Indexes in a table database

I will need to insert 1 billion codes into the SQL Server database table. I will use BULK INSERT for this. My question is: should I create indexes before or after inserting data? I need the fastest option

+3
source share
3 answers

1 billion records in one table? Uch. If you are dealing with data volumes at this level, and you should ask this question in the forum, then you can be outside your element. You must create the index after insertion, but make sure the statistics are updated in the table after insertion. The index will work against you if the statistics are not updated.

+2
source

, / , . , , , .

.

:

+2

. BULK INSERT .

edit: , , , . http://msdn.microsoft.com/en-us/library/ms188365.aspx:

({ [ASC | DESC]} [,... n])

, . , , ,

+1

All Articles