On 10/01/07, Titoxd@Wikimedia <titoxd.wikimedia(a)gmail.com> wrote:
Last night, after I asked Brion whether he could turn
on Rob's
Special:Contributors extension on Wikimedia sites, and Domas colorfully
indicated that it would be a Very Bad Idea(TM). The data for the extension
Domas loves to hate.
can be retrieved from the revision table, but due to
the existing topology
of the table and the current load on the revision table itself, it would
cause a very expensive query. He indicated that another option would be to
Yes. There's an index that we don't have applied that would help this
a little, but not a huge amount.
create a new database table with page, user and
editcount data. I've kept
thinking about the idea, and have modified Domas's suggestion slightly:
Most of this seems sane.
later). Co_timestamp is the timestamp of generation of
the row, added in
case a fancy algorithm to detect old queries is made in the future.
As to how to initially populate the table: well, a bulk initialization
script is one option, but Domas didn't like it either. ;) :P What I
A bulk initialiser would be possible, but would still incur heavy
expense and isn't so easy to batch up.
suggested is to populate the table on demand, and
maintain it later, and
after a night's sleep, I thought about how to refine it more:
The basic premise is sound, even if the implementation could be ironed
out a little. I'll sleep on it and mess about with it soon.
There are probably more efficient ways to do this, but
I just wanted to get
the ball rolling... any comments? Should it be done?
P = "extension goes live"
Q = "extension is optimised"
R = "rob gets peace"
P --> Q and P --> R
¬Q --> ¬R
R, thus Q
Rob Church