SQLTeam.com | Weblogs | Forums

Is it possible to run SQL in the cloud and download the results when it's done?


I use SSMS to run SQL queries and some take too long, more than half an hour.

I wonder if this is due limitations in my local network and machine and whether it would be possible to run the query in the cloud where the server (Azure) is supposedly faster and then simply download the results when it's done.

Any idea?


I wouldn't recommend migrating to Azure as the first thing to consider when trying to solve a performance problem.

You should try to understand why your queries are running slower. There is a wealth of tools available within SQL server to help you do that. For example:

  • You can set statistics on - for instance setting time and IO can tell you the time taken and the number of reads for each statement within your query
  • You can examine the query plan aka execution plan to see how SQL Server is implementing your query and what parts of it are performance bottle necks.
  • If you are on SQL 2016 or later, you can use query store to track a variety of information about your queries over a period of time - e.g. regressed queries, queries that consume most resources, etc.

To use any of the above (and there are others), you will need to do some research. But the great thing about SQL Server is that there are plenty of examples and guidance available online. And, there are plenty of people willing to volunteer their time and efforts to help you get going.

1 Like

Are you able to run the SQL query locally on the machine (RDP to the database server and run SSMS there) to compare the timing?
It could be that the query is slow, or bringing the data to you client over the network is not performing well.

1 Like