Hello, I'm working on a project that requires random images to be chosen from a live database for a dynamic homepage. I found this link from Dr. Hipp that details a very fast approach to selecting random rows:
http://www.mail-archive.com/sqlite-users@sqlite.org/msg14652.html Unfortunately, it heavily weights the distribution of the randomly chosen rows - to the extreme that the feeling of randomness is almost lost due to the same images appearing so frequently. After some research I concluded that it must be caused by breaks in the ROWID values. However, after VACUUMing the database to re-order the ROWIDs I find I am still having the same problem - weighted distribution. Is there a way I can modify my query to attain a much more equal distribution? It doesn't have to be perfect, but right now it is too noticiably weighted. I have posted a stripped down version of the database, and a small snippet of perl to display the problem here: http://www.acatysmoof.com/posting/problems/sqlite/dist.tgz Many thanks to anyone with a moment to share some ideas on how to equalize this distribution. Thanks, Alex ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------