Query slow on SQL 2019

Vadim Sudenko 1 Reputation point
2020-09-01T09:37:21.583+00:00

There is one specific query that has been executed on MS SQL 2014 for long time. The query is running on AG secondary RO replica. The query execution time on MSSQL 2014 is about 5 seconds. After migration to MSSQL 2019 the same query is running about 5 minutes.
We found by trying out the different compatibility modes we can use SQL 2014, 2016, and 2017 modes and get fast results. Only in SQL 2019 does it slow down. Also we found that running the query alone runs quickly in any mode.

There is only problem with SQL 2019.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,982 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. m 4,271 Reputation points
    2020-09-03T01:27:57.267+00:00

    Hi @Vadim Sudenko ,

    Is the reply helpful?
    Do you solve the issue?

    If the reply is helped, please do "Accept Answer".
    BR,
    Mia

    0 comments No comments

Your answer

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