In our production environment we had several servers with SQL server 2012 SP2+Windows Server 2008R2. 3 month ago we migrate all the servers to the SQL Server 2014 SP1+Windows Server 2012 R1. We created new servers with new configuration (more RAM, more CPU, more Disk space) and backup our databases from SQL Server 2012 --> restore to the new SQL Server 2014 servers. After restore we changed compatibility level from 110 to the 120+Rebuild Index+Update statistics.
But now we have problems with several queries which running very slow when compatibility level 120. If we change compatibility level to the old 110 it is running very fast.
I search a lot about this issue, but did not find anything.
SQL Server 2014introduces new cardinality estimatorTrace flags
9481and2312can be used to control which version of Cardinality Estimator is used.Check queries which cause problem and compare execution plans properties estimated number of rows vs actual number of rows values in 2008 and 2014.
Cardinality Estimates in Microsoft SQL Server 2014
From
SQL Server 2016+you could set old cardinality estimator per database without using traceflags or changing DB compatibility level to 110.ALTER DATABASE SCOPED CONFIGURATION