Add OPTION RECOMPILE for perf reasons due to temp table (#7242)

This commit is contained in:
denzilribeiro 2020-03-31 14:54:22 -05:00 committed by GitHub
parent 8ff2645550
commit ccefc42711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -790,7 +790,8 @@ FROM @PCounters AS pc
AND pc.object_name = pc1.object_name AND pc.object_name = pc1.object_name
AND pc.instance_name = pc1.instance_name AND pc.instance_name = pc1.instance_name
AND pc1.counter_name LIKE '%base' AND pc1.counter_name LIKE '%base'
WHERE pc.counter_name NOT LIKE '% base'; WHERE pc.counter_name NOT LIKE '% base'
OPTION(RECOMPILE);
` `
// Conditional check based on Azure SQL DB v/s the rest aka (Azure SQL Managed instance OR On-prem SQL Server) // Conditional check based on Azure SQL DB v/s the rest aka (Azure SQL Managed instance OR On-prem SQL Server)