Tips, Tricks, and Advice from the SQL Server Query Processing Team

The query processing team - query optimization & execution - providing tips, tricks, advice and answers to freqeuently-asked questions in a continued effort to make your queries run faster and smoother in SQL Server.

Browse by Tags

Tagged Content List
  • Blog Post: Distinct Aggregation Considered Harmful

    Distinct aggregation (e.g. select count ( distinct key) …) is a SQL language feature that results in some very slow queries. It’s particularly frustrating that you can take a perfectly efficient query with multiple aggregates, and make that query take forever just by adding a distinct keyword to one...
Page 1 of 1 (1 items)