Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing adding field
Message
De
08/03/2011 16:56:43
 
 
À
08/03/2011 16:17:06
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01502961
Message ID:
01502970
Vues:
63
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform