Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for more optimization
Message
 
 
To
11/02/2009 20:27:17
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Application:
Web
Miscellaneous
Thread ID:
01381114
Message ID:
01381117
Views:
50
>This command gives a deadlock error about 3 times out of 50000 hits:
>
>
>DECLARE @NoMember Integer
>DECLARE @LastAccess DateTime
>
>SET @NoMember=64631
>SET @LastAccess='2009-02-11 11:46:55'
>
>SELECT Member.Numero,Member.Nom,Member.Prenom,Member.LastAccess
> FROM (SELECT Monitor.NoMember2 FROM Monitor WHERE Monitor.NoMember=@NoMember) Temp
> INNER JOIN Member ON Temp.NoMember2=Member.Numero 
> WHERE Member.LastAccess>=@LastAccess ORDER BY 2
>
>
>This line also executed within about 0.00 second. So, what can cause this behavior?

BTW, why do you use this strange select, why not INNER JOIN? Does it work better than INNER JOIN with Monitor?

Or using WHERE EXISTS select query?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform