View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 09:05 AM
mkarbarz@gmail.com
 
Posts: n/a
Default Large number of random rows

Hello,

I have a database of about 130 million records. I need to be able to
retrieve a random subset of those records (say random 100,000
records).

I tried the simplest SELECT * FROM Table ORDER BY RAND() type of
solutions but that is prohibitively slow with the database of this
size. Are there any other solutions available that could help me with
this task? If it's of any help the front end is PHP.

Thanks,

Marek

Reply With Quote