I would like some ideas of improving the Est CPU Cost of this cursor.

Charnee 2016-08-23 14:29:59

I am very new to database administration from a performance tuning stand point so any ideas would be greatly appreciated.

Matak 2016-08-23 23:11:22
Have you looked at the missing indexes ? There are two that it is suggesting but you need to make sure they are sensible
Aaron Bertrand 2016-08-24 03:32:43
Is there a reason you are using the default, heavy-handed cursor options? Try the syntax recommended in this post, consider the indexes as Matak suggested, and consider dropping the distinct if it isn't necessary (and the ORDER BY if it isn't crucial).