Performance degrade after migrating to SQL server 2022

Ginesh 0 Reputation points

Application performance degraded by 15-20 % after moving the database from SQL server 2019 to 2022 on a stand alone server. The resources and maintenance remains the same as the 2019.

  1. Erland Sommarskog 134.7K Reputation points MVP Volunteer Moderator

    Did you stay on compatibility level 150 or did you move to 160?

    Do you have Query Store enabled on the database?

  2. Ginesh 0 Reputation points

    Yes we changed compatibility to 160, and Query story store enabled.


Sign in to comment

Answer recommended by moderator

Erland Sommarskog 134.7K Reputation points MVP Volunteer Moderator

I would recommend that you revert to 150 to see if the degradation persists. If it does not, the degradation is due to one or more queries seeing performance regressions with the new features of the optimizer.

Keep running with compat level 150 for a week or two and then flip back to 160. You can now use Query Store to find the degraded queries, and as a quick resolution you can force the old plans from compat level 150. In the long run, you may want to take a closer look at these queries to see how they can be improved.

While you can do this check manually, there is also a tool in SSMS to help you. Right-click the database in SSMS and select Tasks. You find Database Upgrade at the bottom of the menu.

  1. K Durga Prasanna 30 Reputation points Microsoft External Staff

    Hi @Ginesh

    Hope you are doing great. We would like to confirm if your query has been resolved by the provided solutions. If it is still outstanding, please share any additional information so we can assist you further.

    Thank you.

  2. K Durga Prasanna 30 Reputation points Microsoft External Staff

    Hi @Ginesh

    We would like to confirm whether the issue has been resolved. If it is still outstanding, please share any additional information so we can assist you further.

    Thank you.


Sign in to comment

0 additional answers

Sign in to answer

Your answer