SELECT field_list FROM table WHERE primary_key IN( SELECT primary_key, FROM table ORDER by RANDOM() LIMIT your_limit);
This may not be the exact sequence, and there is some workarounds for some slowness in the IN() keyword. Others may comment at will, and polish this up?
Joseph Shraibman wrote:
Is there a way to get random rows besides ORDER BY random()? The problem with ORDER BY random() is that is has to get all the rows from the table before the results are returned.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]