SQL 2019 Std Edition high recompilation and CPU spike

%3CLINGO-SUB%20id%3D%22lingo-sub-3290396%22%20slang%3D%22en-US%22%3ESQL%202019%20Std%20Edition%20high%20recompilation%20and%20CPU%20spike%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3290396%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20am%20having%20an%20issue%20in%20SQL%202019%20Std%20edition%20where%20I%20am%20seeing%20high%20compilation%20across%20multiple%20stored%20procedure.%20The%20reason%20for%20the%20recompilation%20as%20per%20the%20extended%20event%20trace%20is%20'temp%20table%20changed%E2%80%99.%20However%2C%20when%20the%20same%20code%20is%20run%20across%20SQL%202016%20Std%20edition%20the%20system%20is%20behaving%20normally.%20This%20behavior%20is%20similar%20for%20the%20Developer%20edition%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20database%20and%20the%20tests%20that%20are%20being%20run%20are%20identical%20across%20to%20servers.%20The%20CPU%20and%20memory%20are%20too%20identical%20for%20both%20the%20servers%20and%20before%20running%20the%20tests%20index%20are%20rebuilt%20too.%3C%2FP%3E%3CP%3EBelow%20are%20some%20of%20the%20information%3B%3C%2FP%3E%3CP%3ESQL%20edition.%3CBR%20%2F%3E%3CSPAN%3EMicrosoft%20SQL%20Server%202019%20(RTM-CU15)%20(KB5008996)%20-%2015.0.4198.2%20(X64)%20Jan%2012%202022%2022%3A30%3A08%20Copyright%20(C)%202019%20Microsoft%20Corporation%20Standard%20Edition%20(64-bit)%20on%20Windows%20Server%202016%20Datacenter%2010.0%20%3CX64%3E%20(Build%2014393%3A%20)%20(Hypervisor)%3C%2FX64%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EMicrosoft%20SQL%20Server%202016%20(SP3)%20(KB5003279)%20-%2013.0.6300.2%20(X64)%20Aug%207%202021%2001%3A20%3A37%20Copyright%20(c)%20Microsoft%20Corporation%20Standard%20Edition%20(64-bit)%20on%20Windows%20Server%202016%20Datacenter%2010.0%20%3CX64%3E%20(Build%2014393%3A%20)%20(Hypervisor)%3C%2FX64%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ECommon%20settings%20for%20both%20the%20servers%3CBR%20%2F%3EMin%20Server%20Memory%2051200%20MB%3C%2FP%3E%3CP%3EMax%20Server%20Memory%20112860%20MB%3C%2FP%3E%3CP%3EProcessor%20Intel(R)%20Xeon(R)%20Platinum%208259CL%20CPU%20%40%202.50GHz%2C%202500%20Mhz%2C%208%20Core(s)%2C%2016%20Logical%20Processor(s)%3C%2FP%3E%3CP%3ERAM%20128%20GB%3C%2FP%3E%3CP%3EMAXDOP%201%3C%2FP%3E%3CP%3ECTP%205%3CBR%20%2F%3EIf%20any%20further%20info%20is%20needed%20will%20be%20glad%20to%20provide.%26nbsp%3B%3CBR%20%2F%3ECan%20any%20one%20share%20any%20info%20on%20this%20as%20to%20how%20to%20investigate%20it%20or%20get%20to%20the%20root%20cause%3F%20or%20has%20someone%20come%20across%20a%20similar%20issue%20with%20SQL%202019.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello,

I am having an issue in SQL 2019 Std edition where I am seeing high compilation across multiple stored procedure. The reason for the recompilation as per the extended event trace is 'temp table changed’. However, when the same code is run across SQL 2016 Std edition the system is behaving normally. This behavior is similar for the Developer edition as well.

 

The database and the tests that are being run are identical across to servers. The CPU and memory are too identical for both the servers and before running the tests index are rebuilt too.

Below are some of the information;

SQL edition.
Microsoft SQL Server 2019 (RTM-CU15) (KB5008996) - 15.0.4198.2 (X64) Jan 12 2022 22:30:08 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor)
Microsoft SQL Server 2016 (SP3) (KB5003279) - 13.0.6300.2 (X64) Aug 7 2021 01:20:37 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor)

Common settings for both the servers
Min Server Memory 51200 MB

Max Server Memory 112860 MB

Processor Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz, 2500 Mhz, 8 Core(s), 16 Logical Processor(s)

RAM 128 GB

MAXDOP 1

CTP 5
If any further info is needed will be glad to provide. 
Can any one share any info on this as to how to investigate it or get to the root cause? or has someone come across a similar issue with SQL 2019.

0 Replies