|
|
|
|
Browse by Tags
All Tags » query plans » Aggregates (RSS)
-
There are interesting things to be learned from even the simplest queries. For example, imagine you are given the task of writing a query to list AdventureWorks product names where the product has at least one entry in the transaction history table, but fewer than ten.
One possible query to meet that specification is: SELECT
...
-
Back in 2008, Marc Friedman of the SQL Server Query Processor Team wrote a blog entry entitled “Distinct Aggregation Considered Harmful”, in which he shows a way to work around the poor performance that often results simply from adding the keyword DISTINCT to an otherwise perfectly reasonable aggregate function in a query. This post is an ...
-
A couple of years ago, John Sansom wrote a blog post comparing the performance of two different ways to get the maximum value from a column: MAX() and TOP (1).
http://www.johnsansom.com/performance-comparison-of-select-top-1-verses-max/
In the conclusion, he states:
When a clustered index is present on the table & ...
|
|
|
|
|