Guest author Derik Hammer dismisses the common myth that table variables perform better than temp tables because they are always in memory.
Aaron Bertrand acknowledges that DISTINCT and GROUP BY are usually interchangeable, but shows there are cases where one performs better than the other.
Ben Snaidero explains that if you are updating your SQL Server table statistics nightly, but still seeing occasional poor performance with some of the queries being executed against my database, statistics could be the issue.
One way to improve SQL Server performance is to use as few resources as possible. In this post Rahul Mehta demonstrates how you can do this by disconnecting queries post-execution with a simple change in SSMS.