Organizational Research By

Surprising Reserch Topic

Question:how to Get 10 rows from a query


I have a query which consists of joins and has an output of about 30,000+ records. I would like to get 10 random rows from these records without using SQL command rand().

I tried looping through the records and put them in an array and shuffle (get the 1st 10 after shuffle) them but it takes about 8-12 seconds to generate. I would like to reduce this processing time at all cost.

How will I accomplish this?
asked Sep 13, 2013 in MYSQL by rajesh
edited Sep 12, 2013
0 votes
16 views



Related Hot Questions



Government Jobs Opening


...