However, while reading up on it I came across this:
http://msdn.microsoft.com/en-us/library/ms190397.aspx
which introduces filtered statistics(!).
Instead of
CREATE STATISTICS BikeWeights
ON Production.Product (Weight)
which would give you stats for the entire range, do this:
CREATE STATISTICS BikeWeights
ON Production.Product (Weight)
WHERE ProductSubcategoryID IN (1,2,3)
which will only compute statistics for that subset of data.
No comments:
Post a Comment