Slow performance Azure 'Web App' + Azure SQL DB
Run the following query per session/workload to know what is the type of wait occurring during those workloads:
--your query here
goselect * from sys.dm_exec_session_wait_statswhere session_id = @@spidorder by wait_time_ms desc
The last SELECT statement will provide you all waits for current session.
You can also enable Query Store.
http://www.sqlcoffee.com/Azure_0010.htm
And run the following query to know what makes queries wait during execution
select wait_category_desc, sum(total_query_wait_time_ms) as [sum ms], count(*) as [interval cnt], avg(avg_query_wait_time_ms) as [avg ms], sum(total_query_wait_time_ms / avg_query_wait_time_ms) as [wait cnt]from sys.query_store_wait_statsgroup by wait_category_descorder by [sum ms] desc
The following article will tell you the meaning of each wait category.
Hope this helps.
I faced the same issue today: Azure Web App
with Azure DB
resulted in slow performance on anything interacting with the DB.
However when I ran the app locally on my pc the experience was very fast. I therefore checked my app service and location. I was using S1 service located in the US with the database in Australia.
•I therefore upgraded to Premium S2 and
•Located my Web App and DB to be in the same region.
These two changes resulted in a massive performance increase.
Im not sure why having my previous answer be a duplicate is a problem if Im the original poster of the same answer on another question and and if the answer applies and is correct as is. It doesn't make sense to change it just because. Please comment first and allow me to edit before completely deleting...