contact@syaga.eu

SQL Server slow after migrating from 2014 to 2019: what to check first?

SYAGA CONSULTING · IT consulting and audit since 2009 · SIREN 518 489 471

It is a common scenario: you migrate SQL Server to a newer version to maintain support, only to find that certain queries have become slower than before. It seems counter-intuitive, yet it is explainable. More often than not, the culprit is not the new engine itself, but a shift in the optimiser's behaviour triggered by the migration. Here are the priority points to check, in order.

Compatibility level: the primary suspect

During a migration, a database's compatibility level can shift to that of the new version. However, this level dictates many internal behaviours of the query optimiser. A database running smoothly at level 2014 may adopt different plan choices when moved to level 2019. This is the first parameter to identify and compare against the pre-migration state. Modifying it is not trivial; it must be decided on a bespoke basis following measurement, never through a generic recipe.

The new cardinality estimator

Since SQL Server 2014, a new cardinality estimator has replaced that of previous versions. It estimates the number of rows returned by a query step differently, which can sometimes lead to the selection of an alternative execution plan. While this is neutral or beneficial in most cases, the old estimator produced a superior plan for certain queries and specific datasets. An audit identifies which queries have regressed and distinguishes those caused by the new estimator from those stemming from other issues. Options exist to revert to the previous behaviour on a targeted basis, but it remains necessary to prove that this is indeed the root cause before making any changes.

Statistics and indexes: their state after the cutover

Two other points deserve a systematic check straight after a migration:

  • Statistics. If they have not been refreshed after the cutover, the optimiser works from an outdated picture of your data and makes poor choices.
  • Indexes. A migration may come with a reorganisation of storage; you need to check that the expected indexes still exist, are not fragmented, and that scheduled maintenance is actually running.

Our performance and indexing module, and our maintenance module, instrument precisely these points and output findings ranked P1, P2 or P3.

Sage X3: settings that need realigning

If your SQL Server runs Sage X3, the migration can interact with behaviours specific to the ERP. The FAST 1 hint injected by the X3 engine, the SQLOPTMIZ and SQLOPTNB parameters, and the exact X3 version (its evolution is documented by the Sage community, notably around X3 2024 R1, version 12.0.35) need to be recorded together. A post-migration slowdown on an X3 estate is diagnosed by cross-referencing the state of SQL Server with the application settings, never one without the other.

Settling the question without touching production

The strength of an audit here is that it settles the question by measurement, read-only, without interrupting the business. We compare the observed state with best practice and, where possible, with the situation before the migration. We produce a prioritised list of the queries and settings responsible, with the associated recommendation. That way you avoid two common traps: applying a recipe found on a forum without proof, or staying stuck because you do not know where to start.

Alignment with ISO 27001, NIST, NIS2 and the GDPR, never certification. Data collection changes nothing in your databases.

Is your migration slowing everything down?

We identify the queries and settings that have regressed, without touching your production. A short conversation to scope the diagnostic.

Speak to an expert