question

JustinGriep-9858 avatar image
1 Vote"
JustinGriep-9858 asked DavidSirbasku-2809 edited

New Very Slow Azure SQL Performance from Remote .NET Clients

In the past, I was able to execute SQL queries remotely (external to the Azure environment) with good performance that was fairly comparable to a local database.

Sometime within the last many months, it has suddenly become very slow compared to previous performance. In addition, I don't see the same kinds of issues with SSMS with remote access.

This is happening with applications that use the older ADO.NET datasets and Entity Framework for .NET Framework. We are also using SQL auth and not AD. The SQL databases have plenty of available DTUs and are not overloaded and there are no issues with Azure-hosted apps.

What is the cause of this? Could there be something that is reducing the previous bandwidth or a new security mechanism that is introducing latency?

Thank you in advance for any advice on this issue.

azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered AnuragSharma-MSFT commented

Hi @JustinGriep-9858, welcome to Microsoft Q&A forum and sorry for the trouble you are facing.

As per my knowledge using Entity framework should not have any bandwidth or latency issue with Azure SQL, however there could be other issues related to the app we are trying to connect with Azure thats making the performance slow. We need to check it both from Application side as well as database side.

As an example, using batch queries or stored procedure improve performance. Or optimizing queries for faster execution. We can start by going through below article and check if using any of those suggestions help us:

Tune applications and databases for performance in Azure SQL Database and Azure SQL Managed Instance

Another thing that could impact performance is the proximity of our apps to the regions where we have Azure SQL service deployed. Choosing a region which is near gives good connectivity.

One more thing we can try is using below .NET Core sample project. If this works fine then there is surely some issue with the application code we are using:

Quickstart: Use .NET Core (C#) to query a database

Could you please try these and see if it helps in identifying the issue? Otherwise we can further discuss on the same.


If answer helps, you can mark it 'Accept Answer'




· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JustinGriep-9858, just wanted to follow up on this.

0 Votes 0 ·

Thank you, @AnuragSharma-MSFT . The issue is not with any of our applications hosted in Azure and executing queries in the Azure environment. The issue only exist when we connect remotely with our development environments to Azure SQL. This is happening across multiple applications including ASP.NET classic and EF. We are not currently using .NET core, Just .NET framework.

So tuning does not appear to be the issue or the answer in this case.

That being said, others not replying that they are seeing the same issue indicates we may have a unique problem.

In the end, we have opened a ticket with support and they are working through this with us. I will update this thread when we make a determination.

1 Vote 1 ·

Thank you for replying. Your experience would really help others facing similar kind of issues.

0 Votes 0 ·
DavidSirbasku-2809 avatar image
0 Votes"
DavidSirbasku-2809 answered DavidSirbasku-2809 edited

In my development I also am seeing very slow responses using a local MS Access front end to remote Azure SQL Database with my free account. Like 13 seconds to open a form that has some fields and a few subforms all with small recordsets returned using stored procedures with indexes in place for the joins. If I run the same queries as the stored procedures in SQL Mgmt studio, the results are saying less than 1 second. But when I use ADO with ODBC connections, executing Stored Procs in VBA code, 13 seconds to load the form.

I am wondering if this will improve when I go live and switch the DB from free account SQL Database to paid SQL Database. The free account forced me, in Texas, to use the East Coast Azure center. The Azure tools are not suggesting any indexes or optimizations, and my DTU's don't go above 14% typically.

Regardless of paid vs free, I don't see why the sql mgmt studio can fire off the queries so much faster than the ODBC access forms.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.