Where do I begin?

RichardBrianSmith 2016-02-18 14:48:11

This is a slow running report sp. It takes about 30 mins even after implementing every missing index (NB: all these databases are overwritten every night – so adding indexes here on 'reporting' is not permanent – just saying).

I post this partly to learn performance tuning.

Step-2 (after looking at indexes) would be …looking at scans? lookups? spools? sorts? the big picture? its blinding.

Matak 2016-02-18 21:51:48
If it was me i would go and fix the high % key lookups and also fix up the RID lookups (i believe this means you have a Heap). Just remember not all key lookups are an issue.
RichardBrianSmith 2016-02-19 13:56:29
Thanks Matak.