Implementation of Distinct in MS SQL2000/2005
Database
2
Posts
2
Posters
0
Views
1
Watching
-
-
Random question that popped up on a Friday afternoon at work that nobody seems to know the answer to: How is Distinct implemented in MS SQL 2000/2005? Does it screen every row it pulls in or does it pulls in the whole set of data then run distinct on it?
It runs distinct on the set before returning it from the query. You can see this using execution plans.
--------------------------- Blogging about SQL, Technology and many other things