New Very Slow Azure SQL Performance from Remote .NET Clients

Justin Griep 41 Reputation points
2021-07-29T19:08:47.85+00:00

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
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Anurag Sharma 17,576 Reputation points
    2021-07-30T05:55:59.067+00:00

    Hi @Justin Griep , 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'


  2. David Sirbasku 1 Reputation point
    2021-12-06T17:48:33.17+00:00

    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.

    0 comments No comments