February 11, 2016 at 2:51 am
I have a relativly simple querry that runs in about 15 seconds on SQLServer 2008R2 (SP2)
But when the same database is upgraded to SQLServer 2014 (SP1), it runs forever.
I have followed the steps outlined by Thomas LaRock here
http://thomaslarock.com/2014/06/upgrading-to-sql-server-2014-a-dozen-things-to-check/
I have also enabled trace flag 4199.
Is there anything else I can do while I wait for the querry to complete and provide me with an execution plan. It's currently been running for 17 1/2 hours
February 11, 2016 at 2:55 am
Can you pull the estimated plan from SQL 2014 and the actual plan from 2008 R2 and post them both?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 11, 2016 at 4:21 am
Hallo Gail.
Unfortunitly I can't post them.
But in comparing them I see that the 2008R2 Actuel plan is using a loop join and 2014 a Hash Match.
I've used a hint to force a loop.
It is not my final solution, but it does buy me some time and put me back on familiar ground.
Many thanks for your help
Ian
February 11, 2016 at 7:09 am
did you try changing the compatibility level to check for cardinality issues?
We have had many and some times the quick way to tell for sure is to switch it, then test.
February 11, 2016 at 8:01 am
krypto69 (2/11/2016)
did you try changing the compatibility level to check for cardinality issues?We have had many and some times the quick way to tell for sure is to switch it, then test.
I do not see any difference in performance between sqlserver 2014 in compatibility mode and a sql2008R2 installation.
However running in a compatibility mode is not an acceptable solution for us and we will rewrite the SP's to use a valid execution plan.
(at least, I hope we are able to do that :-))
February 11, 2016 at 9:10 am
You may find the Word document referenced here to be useful:
https://msdn.microsoft.com/en-us/library/dn673537.aspx
Please note, I have played with this a bit but not used it in anger as we do not have any production servers with SQL2014.
February 11, 2016 at 9:20 am
Ian_McCann (2/11/2016)
krypto69 (2/11/2016)
did you try changing the compatibility level to check for cardinality issues?We have had many and some times the quick way to tell for sure is to switch it, then test.
I do not see any difference in performance between sqlserver 2014 in compatibility mode and a sql2008R2 installation.
However running in a compatibility mode is not an acceptable solution for us and we will rewrite the SP's to use a valid execution plan.
(at least, I hope we are able to do that :-))
You can set cardinality compatability for a single query/proc with an option
February 12, 2016 at 1:52 am
Ken McKelvey (2/11/2016)
You may find the Word document referenced here to be useful:https://msdn.microsoft.com/en-us/library/dn673537.aspx
Please note, I have played with this a bit but not used it in anger as we do not have any production servers with SQL2014.
Thank you Ken
The examples shown on page 27 under the title "Join Estimate Algorithm Changes" is exactly what we are getting here 🙂
Figure 21 and figure 22 could be our execution plans :-):-)
February 12, 2016 at 2:13 am
Steve Jones - SSC Editor (2/11/2016)
Ian_McCann (2/11/2016)
krypto69 (2/11/2016)
did you try changing the compatibility level to check for cardinality issues?We have had many and some times the quick way to tell for sure is to switch it, then test.
I do not see any difference in performance between sqlserver 2014 in compatibility mode and a sql2008R2 installation.
However running in a compatibility mode is not an acceptable solution for us and we will rewrite the SP's to use a valid execution plan.
(at least, I hope we are able to do that :-))
You can set cardinality compatability for a single query/proc with an option
Thank you Steve.
It's a political thing.
After the upgrade to SQL2014 (hardware, operating system and sql server) nobody want to see anything running in a comptability mode.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply