implementation of SELECT ... ORDER BY RAND() LIMIT 1

2007-02-08 Thread Jan Pieter Kunst
2007/2/7, Jos Elkink [EMAIL PROTECTED]: Hi all, I have a question about the combination of RAND and LIMIT 1. If I have a query like: SELECT ... ORDER BY RAND() LIMIT 1 with the ... replaced with a normal query on one table. How is this implemented? Is this optimized for the fact that it only

implementation of SELECT ... ORDER BY RAND() LIMIT 1

2007-02-07 Thread Jos Elkink
Hi all, I have a question about the combination of RAND and LIMIT 1. If I have a query like: SELECT ... ORDER BY RAND() LIMIT 1 with the ... replaced with a normal query on one table. How is this implemented? Is this optimized for the fact that it only needs one entry? And what about when

Re: implementation of SELECT ... ORDER BY RAND() LIMIT 1

2007-02-07 Thread Philip Hallstrom
I have a question about the combination of RAND and LIMIT 1. If I have a query like: SELECT ... ORDER BY RAND() LIMIT 1 with the ... replaced with a normal query on one table. How is this implemented? Is this optimized for the fact that it only needs one entry? Try prefixing your query with