Without the execution plan, there are only a few obvious worries in there. First is the ISNULL function on the column: isnull(mig_flag_dlf,'') That's going to lead to scans on whatever table that is. Better to make that an OR statement. Tiny issue, but it will add up, you're not using object owners throughout the code. The IN clause could also be an issue. You might be able to substitute that with a temporary table and use a JOIN. Nothing else jumps out as obvious. The overall complexity of the multiple layered nested queries may be an issue. Rethink the structure.