Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting millions of records
Message
De
05/09/2013 18:27:27
 
 
À
05/09/2013 18:05:02
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01582347
Message ID:
01582357
Vues:
90
This message has been marked as the solution to the initial question of the thread.
If the # of rows you want to delete is much larger than the # of rows being retained, you might want to do this....

- Copy the rows you want to retain to another table
- TRUNCATE the original table
- Load the table you created in step 1 back to the original table (or rename it, or whatever)

Obviously, if you have constraints involved, you'll need to disable or drop them and then re-enable-re-add them

Just a thought
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform