4

I was trying to select a tier for our internal consumption and going through this limitations in detail..Azure SQL Database resource limits

One particular instance of trouble was below chart and particularly highlighted values

enter image description here

as you see ,from the highlighted ,there is a max concurrent limitation of 60 concurrent logins and 600 concurrent sessions

ASK:
a single query can go in parallel and can have multiple sessions,will those sessions count under this limitation ?

i tried to test this using Paul White's article Forcing a Parallel Query Execution Plan like below

DBCC FREEPROCCACHE
DBCC SETCPUWEIGHT(1000)

GO
-- Query to test  
some expensive query
GO

DBCC SETCPUWEIGHT(1)  
DBCC FREEPROCCACHE   

or using

OPTION (RECOMPILE, QUERYTRACEON 8649)

but i can only go upto 9 sessions,when i checked using below DMV

select * from sys.dm_os_tasks 
where session_id=61

and these trace flags and DBCC options wont work in azure .let me know if i am unclear

  • I don't have a direct source, but I believe your assumption is correct. However, if the 60 connection limit is reasonable for your needs it would seem highly unlikely all 60 connections would be open and generating 10 sessions each at the same time. – LowlyDBA - John McCall Jul 25 '17 at 10:50
  • Thanks,but we have some queries which that uses more sessions..like the one in my question here :dba.stackexchange.com/questions/115732/… ..so with this way, we will reach 600 session limit soon – TheGameiswar Jul 25 '17 at 10:53
  • ok,i will try that..but request_id seems to be null all the times – TheGameiswar Jul 25 '17 at 11:01
3

When a task goes parallel it is still considered a single session with multiple request.

Hopefully the following will clear you confusion about the 2 metrics. I

Ref: https://social.msdn.microsoft.com/Forums/en-US/c073c554-03a3-43b5-9052-4de63d1f44d7/logins-versus-sessions?forum=ssdsgetstarted

Lets say you have 10 developers working on your app and they all connect to Azure SQL using SSMS. They will create 10 concurrent logins and 10 sessions in Azure SQL.

Now let's say that your app is using one login for connecting to Azure SQL and you have 100 concurrent users on your app. This will create one concurrent login and 100 concurrent sessions in Azure SQL.

If you want to baseline your concurrent session this is a great article. You might have to tweak it for Azure SQL Database.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.