A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Hi @Arutprakasam
You can refer to this post for Query optimization.
https://www.sql-easy.com/learn/how-to-improve-sql-query-performance/
Best regards,
Percy Tang