Hi all,

anyone knows a good method to retrieve 1 random selevted record out of
thouseands?

right now I'm using

select ID from table ORDER BY rand() LIMIT 1

however, this seems like a very slow method, like mysql first organizes a
few thousand records in a random 1 and only returns 1....

Any help would be great!

thx. Wilbert



--query, mysql---

------------------------- 
Pas de Deux 
Van Mierisstraat 25 
2526 NM Den Haag 
tel 070 4450855 
fax 070 4450852 
http://www.pdd.nl 
[EMAIL PROTECTED] 
-------------------------

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to