[Mediawiki-l] Checking page edits count via direct SQL
Hugh Prior
mediawiki at localpin.com
Tue Jul 11 22:32:47 UTC 2006
I know the values are being taken from the site_stats table, but my question
is really what is the SQL which is used to calculate those values? For
testing purposes, I don't mind how expensive it is to do the SQL directly to
check, even if it is a big SUM().
The reason I'm pretty sure it cannot be right is that at the moment about
the only person on the site is me or a page creating robot, and about the
only thing which I am doing is creating pages (which would I suppose count
as 1 edit). And yet the figures (from
http://en.chainki.org/index.php?title=Special:Statistics though your mileage
may vary) are:
There are 4,794 total pages in the database.
Excluding those, there are 3,504 pages that are probably legitimate content
pages.
There have been a total of ...799,814 page edits since the wiki was setup.
This last figure I would expect to be somewhere around 3600 (i.e. not much
more than 1 edit per page). It is not even remotely close to that. Because
the code at the point of displaying these figures only reads the apparently
wrong site_stats table I'm not sure how/where the actual calculation of this
table is done.
"Rob Church" <robchur at gmail.com> wrote in
message news:e92136380607110728i21e10f05r9cd1322259e48d5a at mail.gmail.com...
> On 11/07/06, Hugh Prior
> <mediawiki at localpin.com> wrote:
>> I don't think the edits count on my stats page on my wiki is correc.
>> Where
>> does it calculate the number from? What is the SQL (I suppose) it uses?
>
> All of these figures come from the site_stats table to save time on
> larger sites, since COUNT(*) queries against huge tables can be
> downright expensive.
>
> In this case, the ss_total_edits column is being referenced. What
> makes you think the total is incorrect?
>
>
> Rob Church
More information about the MediaWiki-l
mailing list