SSMS V22 times out on large queries where v19 did no

Claudio Cavalli 5 Reputation points
2025-09-26T19:18:21.06+00:00

Hello,

I use my laptop with SQL Developer to prototype databases before publishing them on a live SQL server. My laptop crashed and I had to reinstall all of the software. In my old laptop I was using SQL Server v2016 (not sure about this version) and SSMS 19.
On the new laptop I am using SQL Server v2022 and SSMS 22. I restored my DB but when I run queries with a lot of rows (we are talking over 1M rows sometimes) my SSMS queries now timeout. I determined that is it not a server side issue by running an SQL query in a CMD window with output to a CSV file. THerefore it is a SSMS issue.

Why is this happening? How do you release a newer version of a piece of software that breaks what was previously working? THis is maddening!

SQL Server | SQL Server Transact-SQL
{count} vote

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 127.6K Reputation points MVP Volunteer Moderator
    2025-09-26T21:23:42.0433333+00:00

    Cool down. When you use software for things that are outside of their main intended scope, you may be on the margin of their capabilities, which means that works this week, may stop working the next.

    Running queries that return one million rows into SSMS is not a regular use case. At least not how I use SSMS. I use SSMS to look at and diagnose data. Working with one million rows in the results grid in SSMS is very impractical.

    That said, by default, SSMS does not use a timeout when you execute queries from a query window. You can right-click in a query window and select Query Options at the bottom of the dropdown. You will see something like this:

    User's image

    What is the exact error message that you get?


  2. Erland Sommarskog 127.6K Reputation points MVP Volunteer Moderator
    2025-10-06T20:51:22.6866667+00:00

    I have since learnt that there is a known issue, reported here: https://developercommunity.visualstudio.com/t/Execution-Timeout-Expired/10963347?q=timeout

    The status of this bug is "Fixed, release pending", which means that the fix will appear next time when there is an update of SSMS.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.