SQL Server 2014 Optimizer index selectivity -


i found sql server 2012 , sql server 2014 use different non-clustered index same query , execution plan sql server 2014 sucks.

i try update related tables , indexes fullscan kick old plan off, sql server 2014 not using same index sql server 2012.

has faced problem, too?

how optimizer on 2012 , 2014 make decision indexes selectivity?

sql server 2014 uses new cardinality estimator, can cause bad plans.

it new way sql server "guess" how many rows returned each operator in plan.

you can disable on specific query (if estimations causing bad plan) appending option (querytraceon 9481) query.

you can disable server wide setting compability level lower 120:

alter database adventureworks2012 set compatibility_level = 110; 

you might able rewrite query new cardinality estimator performs better old estimator.

there lot of information new cardinality estimator, take time read of it. start: http://sqlperformance.com/2013/12/t-sql-queries/a-first-look-at-the-new-sql-server-cardinality-estimator


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -