SQL Performance Tuning
Analyse query execution plan (IO/ time)
Avoid lazy spooling (temporary memory for computation) caused by duplicate aggregation
Ignore lazy spooling caused by recursive queries
Unnecessary query minimization using cross apply, outer apply.....
Partition elimination. For example: getting data with predicate dattime2 but table has column type datetime. In this case we can optimize using datetime2 instead of datetime by casting.
Try to avoid using function in where clause and in join
..........