MySQL Forums
Forum List  »  Optimizer & Parser

Re: Strategy needed for picking random rows
Posted by: Joachim Berger
Date: September 08, 2011 01:17AM

Hi Øystein,

the outer query selects many fields from the 'members' table (and might even include some more LEFT JOINs on one or two other tables), that's why I was saying "m.bulky_field1, ...". The inner query uses only index fields, which performs better ("covering index strategy").

The idea with LIMIT is not really satisfying, because, AFAIK, the optimizier still scans every row up to the given limit and then discards the unneeded rows. Also, I'd need to precompute the maximum limit - no option.

Options: ReplyQuote


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


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.