Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An update which does not finish
Message
 
 
To
20/04/2015 15:24:58
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01618796
Message ID:
01618824
Views:
29
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform