I am looking at refactoring this stored procedure as it seems that it is causing a timeout on the Azure DB using 100% of DTU capacity.
Does anyone have any suggestions how I could improve the SQL used in my stored proc?
Thanks
declare @value bigint
declare @secondValue bigint
select @value = count(*) from [dbo].[myTable]
where ([Name] = 'something') AND ([Type] = 'paid') AND profilestatus = 'something'
and ExpiresOn >= CURRENT_TIMESTAMP
select @trialing = count(*) from [dbo].[myTable]
where ([Name] = 'something') AND ([Type] = 'avalue') AND profilestatus = 'something'
and ExpiresOn >= CURRENT_TIMESTAMP
select @value as firstValue, @secondValue as secondValue
Client Stats:
