On 18/10/06, sicoffey
<[EMAIL PROTECTED]> wrote:

Thanks, interesting to know that MP3 might not solve the problem.

No, it wont. The problem is with the SQL query which randommix
uses. Essentially:

SELECT * FROM tracks ORDER BY RAND() LIMIT 1

Behind the scenes this will fetch ALL the tracks, sort them
randomly, then return the first track in the list. I just tried the
query on my main server and it takes 8 seconds to complete
(70k ish tracks)..

There must be ways of speeding this up, at least for the
simple non-filtering random cases.

In fact, there seems to be a fair bit of discussion on the subject
of speeding this up down:
http://dev.mysql.com/doc/refman/5.0/en/select.html

--
- Dr Lovegrove
Free Moose for all at:
http://www.rusticrhino.com/drlovegrove
_______________________________________________
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to