SQL Galaxy (10/7/2015)
HI.I have verified at DB level for Index farg and statistics are normal but still execution take long time to completed.
Actual Execution plan does not suggested any missing index.
Pl. suggest the attached actual execution plan and SP definition.
Thanks
The nested cursors are most likely the cause. Replace the whole nested cursor section with set-based code.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden