• Is there a table on a linked server?

    If so, it may be better to pull the necessary data into a temp table and then do the unions.

    Also, the subselects with the top 1, may be better to do an outer apply.

    I would test this if I had some DDL.

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]