sql 随机数高效率算法
Declare @d Datetime
Set @d=getdate()
SELECT Top 1* FROM [user_info]
WHERE 0.01 >= CAST(CHECKSUM(NEWID(), [id]) & 0x7fffffff AS float) / CAST (0x7fffffff AS int)
Select [语句执行花费时间(毫秒)] = Datediff(ms,@d,Getdate())
Declare @d Datetime
Set @d=getdate()
SELECT Top 1* FROM [user_info]
WHERE 0.01 >= CAST(CHECKSUM(NEWID(), [id]) & 0x7fffffff AS float) / CAST (0x7fffffff AS int)
Select [语句执行花费时间(毫秒)] = Datediff(ms,@d,Getdate())