Posted By

Tamedo on 06/04/08


Tagged


Versions (?)

Speed up RAND() on large data sets


 / Published in: PHP
 

  1. $query2 = "SELECT * FROM table T JOIN (SELECT MAX(id) AS id FROM table) AS x ON T.id >= FLOOR(x.id*RAND()) LIMIT 10;";

Report this snippet  

You need to login to post a comment.