Re: Not generating the same random number twice....
On Tue, 14 Jun 2005 08:35:44 GMT, nemo wrote:[color=blue]
> All these much more sophisticated solutions make me wonder where I went
> wrong in the early days.
> $Query="select image_filename from Tablename order by rand() limit 5";[/color]
1. His image filenames are not in a db :)
2. Order by rand potentially causes enormous overhead. See for example
http://jan.kneschke.de/projects/mysql/order-by-rand/ (performance data
at bottom of page).
--
Firefox Web Browser - Rediscover the web - http://getffox.com/
Thunderbird E-mail and Newsgroups - http://gettbird.com/
On Tue, 14 Jun 2005 08:35:44 GMT, nemo wrote:[color=blue]
> All these much more sophisticated solutions make me wonder where I went
> wrong in the early days.
> $Query="select image_filename from Tablename order by rand() limit 5";[/color]
1. His image filenames are not in a db :)
2. Order by rand potentially causes enormous overhead. See for example
http://jan.kneschke.de/projects/mysql/order-by-rand/ (performance data
at bottom of page).
--
Firefox Web Browser - Rediscover the web - http://getffox.com/
Thunderbird E-mail and Newsgroups - http://gettbird.com/
Comment