[Toolserver-l] Global contrib count

MZMcBride z at mzmcbride.com
Sat Apr 23 06:39:14 UTC 2011


Manish Goregaokar wrote:
>> An important key in every allwiki-iteration is imho the re-use of
>> connections.
> Yeah, I already do that. I've ORDER BY server'd , and I only close and reopen
> when the server changes. It's quite fast.
> 
> What's the quick way to get user/page contribution data? I tried using the
> page table through putty, but it hanged. The revision table works, but I can't
> get the page title from it. For some reason, the column rev_page is populated
> with zeroes. I am able to get the username, revid, timestamp, and summary, but
> I can't fetch the page name/pageid. ANy help?

The quick way to get the user's edit count is to use the stored value from
user.user_editcount.

If you're trying to use the page table to get edit contribution data, you're
going to have trouble, because all edits (contributions) are in the revision
table.

If you want to use the revision table and fetch page titles, do a join on
rev_page = page_id. Then you can select page_namespace and page_title (or
the namespace name instead of an integer from the toolserver.namespacename
table).

More info about accessing and using the replicated databases is available
here: <https://wiki.toolserver.org/view/Database_access>.

MZMcBride

P.S. Plaintext e-mails, please. :-)





More information about the Toolserver-l mailing list