Tuesday, February 28, 2012

TABLESAMPLE example

SELECT
FROM
id, name dbo.customers TABLESAMPLE SYSTEM(20 PERCENT)


BTW - This is better than the classic method of getting sample data
       select top 5 * from stats order by  newid()    
because in large amounts time will be spent creating the GUID

No comments:

Post a Comment