tag:blogger.com,1999:blog-6580088942610704648.post5759928261311727086..comments2024-01-08T07:40:07.042+01:00Comments on Raphinou's blog: Random image in Ez Publishraphinouhttp://www.blogger.com/profile/10541528354162666577noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6580088942610704648.post-66686270793723078642011-03-27T14:59:28.441+02:002011-03-27T14:59:28.441+02:00Just bumped into this thread, though it's old....Just bumped into this thread, though it's old. You should first get image count, then define your random number using it, then you should fetch only one image - a fetch with limit 1 and offset equal to your random number. Otherwise your page will be slow beyond any reasonable load time.RedQueennoreply@blogger.comtag:blogger.com,1999:blog-6580088942610704648.post-51884417253462768432009-02-26T12:10:00.000+01:002009-02-26T12:10:00.000+01:00Well, okay, except that if you have 10000 images y...Well, okay, except that if you have 10000 images you're going to fetch them all and probably kill your DB server in the process :)<BR/><BR/>It really, really depends on content volume.<BR/><BR/>Bottomline: a fetch, such as this one, without an explicit limit parameter, can be a complete performance killer. Beware.<BR/><BR/>PS: just found this entry while googling about eZ performance. Felt compelled to comment. Don't mind me ;)metamatikhttps://www.blogger.com/profile/03672937301101335601noreply@blogger.com