Sql Server, Query Optimization.
SELECT * in production queries — Explicitly list only the columns you need in the SELECT clause. This reduces the amount of data transferred and can improve performance. Limit the use of DISTINCT and ORDER BY — Use DISTINCT and ORDER BY judiciously, as they can have a significant impact on query