Hi @Srinivas Kamutam ,
It could be better for you to provide the execution plan, table structure of all 6 tables, together with some sample data, index details.
Only according to your query provided, please refer below tips and check whether it is helpful to you:
- Make sure all columns in where condition and select part have clustered index or non-clustered index.
- Consider to remove the DISTINCT/order by.
- Consider to remove the nolock hint.
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.