[Labs-l] Tool labs replicas are missing the indexes?

Antoine Musso hashar+wmf at free.fr
Wed Nov 12 09:00:07 UTC 2014


Le 11/11/2014 14:36, Brad Jorsch (Anomie) a écrit :
> On Tue, Nov 11, 2014 at 1:02 AM, Giovanni Luca Ciampaglia
<snip>
> >   Drawing a list of random titles with page_random takes more than a
> >   minute!
> 
> 
> Because you're doing it wrong. "page_random > rand()" evaluates rand()
> *for each row*. Since it's nowhere near constant, it can't use an index.
<snip>

Hello,

Grabbing random pages is a bit of madness which has long confused
people. Brion Vibber wrote a nice explanations a few years ago that
gives a good overview:

https://brionv.com/log/2007/11/22/random-tests/

-- 
Antoine "hashar" Musso




More information about the Labs-l mailing list