HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

MS-SQL-Server 2019 is slower than SQL-Server 2008

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
2008sqlthanslower2019server

Problem

Since we updated from SQL Server 2008 to 2019, the queries have become much slower.

The following query ran for ten minutes on version 2008. On version 2019 it runs for over 30 minutes.

Until yesterday, we always limited the WHERE-clause: where date > '20180101'

To make the script at least a bit faster, I narrowed it down from January 2019: where date > '20190101'

Now it's even slower than before. No joke! Because one year less has to be evaluated, the running time has increased by a few minutes.

I have checked all the indexes in detail and I think we have created the correct indexes.
But I don't know if this is really an index problem, because in version 2008 we had the same indexes.
In version 2019 I even deleted and re-created a few important indexes. But that didn't help at all.

MS-SQL Server 2019 got very slow and I don't know why.

Solution

The database compatibility level controls the behavior of the query optimizer.

So the recommended upgrade process is to keep the upgraded database on the lower database compatibility level initially, while you use Query Store to capture a performance baseline for the database.

See

Change the Database Compatibility Level and use the Query Store

Context

StackExchange Database Administrators Q#286031, answer score: 3

Revisions (0)

No revisions yet.