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.
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.