View Single Post
Old 06-18-2010, 09:18 PM  
escoman
Confirmed User
 
escoman's Avatar
 
Join Date: Jun 2004
Posts: 597
Quote:
Originally Posted by amphibient View Post
Also (again) do you have any indexes on your table?
Yes i have indexes. About 15 000 rows.

SELECT id, col1, col2, ... , colN FROM tab WHERE id IN (SELECT id FROM tab WHERE conditions ORDER BY RAND() LIMIT m)

doesn't work in my version of mysql 4.1.22.

I want it to be as random as possible. Pulling them like 1 2 3 or 21 22 23 is out of question.
__________________
Porn
escoman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook