Aaron Halfaker wrote:
What about logging.log_page? I don't see it in enwiki_p either.
Huh. The reference to logging.log_page required me to go to mediawiki.org and figure out what you were talking about. I guess at some point logging.log_page was added as a reference to page.page_id. It looks like there's an index on it as well (CREATE INDEX /*i*/log_page_id_time ON /*_*/logging (log_page,log_timestamp);).
It's not part of the logging view currently on the Toolserver. You can file a ticket in JIRA if you'd like to see the column exposed (https://jira.toolserver.org). Even if the logging view is modified to expose that column, I can't imagine it'd be very helpful. I don't know if Wikimedia has that index (or that column, for that matter) and I don't imagine it's been back-populated. I don't imagine it'd even be possible to back-populate in most cases.
When joining against the logging table, use the log_namespace/log_title pair. That's the reliable way to get old log entries. If you're concerned about speed, there's an alternate view to the logging table called "logging_ts_alternative" that you can use (it simply omits certain redacted rows rather than checking their permissions, or something).
There should be some decent info about MySQL/queries/database access on the wiki: https://wiki.toolserver.org.
MZMcBride