On ĵaŭ, 2003-02-06 at 23:41, Olrick wrote:
On 06 Feb 2003 23:12:52 -0800
Brion Vibber <brion(a)pobox.com> wrote:
Off the top of my head; what if the random queue
listed *every* page;
each page would be queued when it was created (and removed if deleted or
changed to non-"article" state), and associated with a random index
number. When asked to view a random page, we sort on the random index
column (which would be indexed!) and take the lowest number; then assign
that same article a new random index.
This wouldn't require the occasional delay to refill the queue, and
since the random index would be indexed, retrieval should be quick
enough even with a large number of articles.
Sounds good, but then why not put the random index field directly into the
'cur' table ? It would allow to completely remove the random queue table.
Er, yes, that makes more sense. :)
This is in CVS, and in place on
test.wikipedia.org. Try it out...
-- brion vibber (brion @
pobox.com)