Migrated DB to SQL Azure very slow

  • Hi!

    I migrated a quite simple DB from SQL 2016 to SQL Azure PaaS.

    The app server using the DB is also in Azure, same location and RG.

    Now when running queries it is extremely slow. Both from the app server, and I also did a test creating 750000 rows:

    -onprem server: 5,38 min

    -SQL Azure: 42,27 min

    All the time the utilization of resources (CPU/IO) are very low (0-3%)

    • This topic was modified 2 weeks, 3 days ago by  niklasrene.
  • It's hard to say without a lot more data. Capture query metrics using extended events. Capture wait statistics (you can combine these with the query metrics using extended events so you can see waits per query). Look at the execution plans. All this will tell you what's going on with the Azure SQL Database instance.

    In general, you should see similar performance to your on premises systems, completely depending of course, on what kind of hardware you have locally, and what service tier you pick in Azure.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • One other thing to look at would be bandwidth.  On-Prem, you may have a Gb ethernet connection between you and the server.  In the cloud, you may have reduced bandwidth.

    As an example, I currently work from home and pulling in data from a SQL instance is substantially slower than on-prem.  My work around is to RDP to an on-prem machine when I need to run big queries or want to do query tuning.  We run everything on-prem, but my internet at home is a LOT slower than what is offered at my workplace.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply