摘要:
经测试,在MSSQL中用以下方法随机读取3W多条数据,只用了1-2秒。而在实际运用中,肯定是不会随机读取这么多数据的MSSQLselect id from tablename where id >= (select floor(rand() * ((select max(id) from tablename) - (select min(id) from tablename)) + (select min(id) from tablename))) order by idMYSQLselect * from tablename where id >= (select floor(r 阅读全文