I've looked at the diagram on the mediawiki site -- and it still not clear to me what the page_latest column references (they don't seem to be page_ids)...
Can someone please clarify?
Thanks.
Yousef Ourabi wrote:
I've looked at the diagram on the mediawiki site -- and it still not clear to me what the page_latest column references (they don't seem to be page_ids)...
Can someone please clarify?
Thanks.
It refers the revision ID in the table "revision" ("rev_id") of the latest page revision. Note that this ID may be referenced in the URL as "oldid" (e.g. when showing an old revision).
I've looked at the diagram on the mediawiki site -- and it still not clear to me what the page_latest column references (they don't seem to be page_ids)...
Can someone please clarify?
Thanks.
It refers the revision ID in the table "revision" ("rev_id") of the latest page revision. Note that this ID may be referenced in the URL as "oldid" (e.g. when showing an old revision).
I know the original query has been answered already, but I'd like to put in a good word for the database docs at MediaWiki.org - they're generally really quite good, with a page about each database table, including a quick explanation of what most fields are for, e.g.: http://www.mediawiki.org/wiki/Page_table#page_latest
-- All the best, Nick.
On 13/09/2007, Yousef Ourabi Yousef.Ourabi@cnet.com wrote:
I've looked at the diagram on the mediawiki site -- and it still not clear to me what the page_latest column references (they don't seem to be page_ids)...
It's the revision identifier (rev_id) of the current revision of that page; storing it here is far faster than an inefficient JOIN against revision coupled with a MAX() statement.
Rob Church
From the sept dump -- the page_counter seems a bit low doesn't it???
Sticking my query and results inline to make sure I'm sane....
mysql> select page_id, page_title, page_counter, page_touched from page where page_namespace = 0 and page_is_redirect = 0 and page_counter != 0 and page_touched > 20070401081635 order by page_counter desc limit 10;
+---------+------------------------+--------------+----------------+ | page_id | page_title | page_counter | page_touched | +---------+------------------------+--------------+----------------+ | 6658 | October_2003 | 53194 | 20070906023554 | | 10678 | List_of_French_people | 44369 | 20070907220800 | | 25422 | Deaths_in_2003 | 31832 | 20070906023330 | | 18831 | Mathematics | 30774 | 20070904214120 | | 32927 | World_War_II | 22064 | 20070908031643 | | 2749 | Aria_Giovanni | 21450 | 20070903003745 | | 22972 | Western_philosophy | 20998 | 20070905155738 | | 4015 | BASIC | 20415 | 20070905031431 | | 24961 | Prince_Albert_piercing | 19780 | 20070902144740 | | 5180 | Chemistry | 17720 | 20070908041819 | +---------+------------------------+--------------+----------------+ 10 rows in set (36.91 sec)
On 13/09/2007, Yousef Ourabi Yousef.Ourabi@cnet.com wrote:
From the sept dump -- the page_counter seems a bit low doesn't it???
Ignore the page.page_counter column; we haven't had updates enabled for it for quite a considerable time - having to write to the master each time we got a page view isn't compatible with our overall caching strategy, not to mention read load.
There have been various developments aimed towards Squid-based logging of page views, and I think we've got a strong backend in place for doing it, but so far, no client-side/report generation stuff, so far as I know - at least nothing concrete.
Rob Church
wikitech-l@lists.wikimedia.org