Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
boostr.in questions - 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?
Sep 13, 2013
Sep 12, 2013
to add a comment.
Related Hot Questions
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please