Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing delete SQL
Message
De
17/02/2011 13:04:25
 
 
À
17/02/2011 12:38:43
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:
01500559
Message ID:
01500571
Vues:
42
>For the table in question....are there indexes and/or relation/constraints involved, and/or any delete triggers?

Index on that field is enabled, no relation, constraint or trigger involved.

>Also, have you looked at the execution plan?

I have attached an image of the result to this message. The second image shows the details for the 97%.

>There are different possible optoins....if the table has an ID you can use (for the IDs to be deleted), if you're passing them in the same order as the original table (if you're using a clustered index), you may get more cache hits.

I think using a date field might be an issue. I might be better to find the primary key first and delete everything older than that primary key.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform