Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing adding field
Message
From
08/03/2011 16:56:43
 
 
To
08/03/2011 16:17:06
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01502961
Message ID:
01502970
Views:
62
This message has been marked as the solution to the initial question of the thread.
>Would there be a way to optimize this line which adds a field into a table:
>
>
>ALTER TABLE [MyTable] ADD [MyField] numeric(11,0) DEFAULT 0 WITH VALUES
>
>
>Considering that the table has 1838535 records, this takes between 5 and 10 minutes for each new field. I just had to add 28 fields and this took 4 hours.

Altering many fields in 1 statement might help... only 1 time to read the whole dbTable
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform