Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
An update which does not finish
Message
 
 
À
20/04/2015 15:24:58
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01618796
Message ID:
01618824
Vues:
27
>BTW, after more analysis on this, this does not resove the issue.
>
>The same command executed on repetition, will most of the times finish in 22 seconds. Then, out of nowhere, it will run and never finishes.
>
>Yes, the move of the two conditions inside an INNER JOIN results in the same. But, this INNER JOIN results in the same command I had at first.
>
>This is probably why I end up in the same situation again.

What exactly you're testing right now? Are you testing how long the select statement will take and closing SSMS after each test? Or you're testing the UPDATE statement?

I don't expect the good performance when you JOIN based on the time ranges between two tables. It may be better to do an actual loop and using fixed dates intervals.

In other words, say, you need to update 10 Clients rows. I expect that even CURSOR based loop for these 10 rows will be quicker than single UPDATE statement.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform