On 21.2.2008, at 4.05, Anthony Richardson wrote:
depending on the business requirements for doing a random select anyway, you may be able to create "randomvalue" column on the table and then do a select against that. Have a background thread (or a stored procedure) that then updates all the rows with a random value every 10 minutes (or every hour?). That way the time consuming part is not customer facing.This depends on why you need a random selection in the first place ofcourse!
Here's Jan Kneschke's take on the subject: http://jan.kneschke.de/projects/mysql/order-by-rand //jarkko -- Jarkko Laine http://jlaine.net http://dotherightthing.com http://www.railsecommerce.com http://odesign.fi
smime.p7s
Description: S/MIME cryptographic signature