Share via

how to resolve degraded sql performance since upgrading from sql 2016 to sql 2022

Greg Booth 1,496 Reputation points
2026-02-15T23:44:37.3066667+00:00

We have a sql instance ( on premise) that was running sql 2016. Query store was not enabled. We have a large workload that runs overnight, hundreds of stored procedures.

We have upgraded to sql 2022, but had an approximately 10% increase of the duration of the overnight workload and would like to resolve this.

So far we have

a) changed the database to sql 2022 compatibility mode

b) enabled query store (operation mode = read write, query capture mode = auto)

c) changed MAXDOP to 8 ( the servers has 8 vcpu), ( maxdop was set to 0 before) and the cost of parallelism to 50 ( it was 5 before)

None of these changes have resolved the performance degradation.

Is there anything else i can try ?

SQL Server Database Engine
0 comments No comments
{count} votes

Answer accepted by question author
  1. Erland Sommarskog 133K Reputation points MVP Volunteer Moderator
    2026-02-16T22:28:18.93+00:00

    What edition of SQL Server do you have?

    Only enabling Query Store is not that likely to improve matters(*), what Query Store does is to capture information about your query execution. That is, you can use Query Store to find out where you bottlenecks are.

    A recommended approach with upgrades like this is as follows:

    • Make sure Query Store is enabled.
    • Make sure that the compatibility level is the old level, in your case 130.
    • Run with this for a week or two.
    • Switch to the new compat level, in this case 160.

    You can now use Query Store to find regressed queries, and you can also address queries by forcing the old plan from the older compat level through Query Store. This may not be a long-term solution, but it helps with the critical issue.

    There is is also tooling support for this in SSMS. Right-click a database and select Tasks from the context menu, and at the bottom of the task menu there is Database Upgrade.

    If you feel that you see performance degradation also with compat level 130, you will need to dig deeper in the Query Store data to find slow queries and think about how they can improved.

    (*) There are however some Intelligent QP features that builds on Query Store. They analyse plans for certain patterns, and they can induce Query Store hints to affect cardinality estimation. So that way Query Stored can actually improve performance only by being on. But again, these are quite special cases and do not always happen. Also, these features are only available in Enterprise Edition.


1 additional answer

Sort by: Most helpful
  1. Lakshmi Narayana Garikapati 920 Reputation points Microsoft External Staff Moderator
    2026-02-16T15:36:19.19+00:00

    Hi Greg Booth,

    Thank you for reaching out to the SQL Q&A forum. I have included the previously resolved thread related to your issue, which may help you better understand and resolve the problem.

    https://learn.microsoft.com/en-us/answers/questions/5536165/performance-degrade-after-migrating-to-sql-server?page=0#answer-12207520

    Thanks,

    Lakshmi.


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.