MySQL Forums
Forum List  »  Optimizer & Parser

Re: Strategy needed for picking random rows
Posted by: Øystein Grøvlen
Date: September 08, 2011 01:08AM

Hi Joachim,

What is the purpose of the join? It seems to give the same rows as the inner query.

How random does the result need to be? One idea is to use a prepared statement with "LIMIT ?, 200", and compute a random number for the parameter on each execution. Will not give random order, but the set of records should be different.
(I have not tried this, so no guarantees about performance.)

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Strategy needed for picking random rows
1325
September 08, 2011 01:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.