Home Forums Article Discussions Article Discussions by Author Discuss content posted by Seth Delconte Randomizing Result Sets with NEWID RE: Randomizing Result Sets with NEWID
Barry-193141
Grasshopper
Points: 12
More actions
March 3, 2010 at 12:53 am
#1127566
To counter performance issues, the easiest thing to do is add tablesample (10 percent) to the query.
This way the newid() function only needs to run on an already randomized sample of 10 percent instead of against the entire data set.
Barry