Skip to main content
Incorporated comment
Source Link
Paul White
  • 90.3k
  • 30
  • 423
  • 663

We recently upgraded our MSSQL Server from 2012 to 2022 and in that regard also updated the COMPATIBILITY_LEVEL from 110/2012 to 160/2022 (Allall indexes hashave been rebuilt). But I'm seeing some difference in execution plan for a specific table with 475.000 rows where in 110 it runs a key lookup and in 160 it runs a clustered index scan.

So, I was wondering if it's a problem or if it's okay? Generally, I'm seeing a higher CPU usage in 160 compared to 110.

110 execution plan

I tried with both FORCE_LEGACY_CARDINALITY_ESTIMATION and DISALLOW_BATCH_MODE hints, but it's still using clustered index scan. I also tried updating statistics without fullscan for the two tables involved (ExternalBookmark and Dokument) but still no luck.

We recently upgraded our MSSQL Server from 2012 to 2022 and in that regard also updated the COMPATIBILITY_LEVEL from 110/2012 to 160/2022 (All indexes has been rebuilt). But I'm seeing some difference in execution plan for a specific table with 475.000 rows where in 110 it runs a key lookup and in 160 it runs a clustered index scan.

So I was wondering if it's a problem or if it's okay? Generally I'm seeing a higher CPU usage in 160 compared to 110.

110 execution plan

We recently upgraded our MSSQL Server from 2012 to 2022 and in that regard also updated the COMPATIBILITY_LEVEL from 110/2012 to 160/2022 (all indexes have been rebuilt). But I'm seeing some difference in execution plan for a specific table with 475.000 rows where in 110 it runs a key lookup and in 160 it runs a clustered index scan.

So, I was wondering if it's a problem or if it's okay? Generally, I'm seeing a higher CPU usage in 160 compared to 110.

110 execution plan

I tried with both FORCE_LEGACY_CARDINALITY_ESTIMATION and DISALLOW_BATCH_MODE hints, but it's still using clustered index scan. I also tried updating statistics without fullscan for the two tables involved (ExternalBookmark and Dokument) but still no luck.

improved formatting
Source Link
tinlyx
  • 3.7k
  • 14
  • 48
  • 79

We recently upgraded our MSSQL Server from 2012 to 2022 and in that regard also updated the COMPATIBILITY_LEVELCOMPATIBILITY_LEVEL from 110/2012 to 160/2022 (All indexes has been rebuilt). But I'm seeing some difference in execution plan for a specific table with 475.000 rows where in 110 it runs a key lookup and in 160 it runs a clustered index scan.

We recently upgraded our MSSQL Server from 2012 to 2022 and in that regard also updated the COMPATIBILITY_LEVEL from 110/2012 to 160/2022 (All indexes has been rebuilt). But I'm seeing some difference in execution plan for a specific table with 475.000 rows where in 110 it runs a key lookup and in 160 it runs a clustered index scan.

We recently upgraded our MSSQL Server from 2012 to 2022 and in that regard also updated the COMPATIBILITY_LEVEL from 110/2012 to 160/2022 (All indexes has been rebuilt). But I'm seeing some difference in execution plan for a specific table with 475.000 rows where in 110 it runs a key lookup and in 160 it runs a clustered index scan.

Source Link
Dumpen
  • 109
  • 3
Loading