• tcronin 95651 - Sunday, April 23, 2017 2:13 PM

    have the below code from 3rd party app trying to get rid of expensive key lookup. Output from therapyadmin table is causing it, tried index with include caused update issues too many columns, anyone have idea for better approach in the select?  Covering index worked but too much overhead with the writes
    Thanks

    Snip                                    

    Can you change the code? If not, how are you implementing the new index?
    Can you post an actual execution plan as a .sql attachment? Cheers.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    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