[Mediawiki-l] Checking page edits count via direct SQL

Hugh Prior mediawiki at localpin.com
Wed Jul 12 08:52:58 UTC 2006


My guess then is, either:
a) my code, in trying to auto-create pages, gets a little too 
over-enthusiastic in forcing the save and somehow the increment happens too 
many times (let's say it is most probably my code causing the problem)
b) some other bug in MediaWiki software which does not normally show up but 
because of the slightly non-standard way I am using MediaWiki it manifests 
itself

Either way, I think I'm just going to hack the stats page 
(http://en.chainki.org/index.php?title=Special:Statistics) so that the edit 
count and related goodies are just not displayed.

Or is there a way (or a reasonable need to consider writing) to do a 
recalcEditCount()?  I suppose it is possible (though very expensive) to 
calculate it from scratch, since you "only" need to look at how many pages 
there are and how many history edits each has.  Or is that logic basically 
wrong?  If not, then would I be right that a maintanance "recalcEditCount" 
script would be possible?


Hugh

"Rob Church" <robchur at gmail.com> wrote in 
message news:e92136380607111538y4559c946i3f4c38023ede2075 at mail.gmail.com...
> On 11/07/06, Hugh Prior 
> <mediawiki at localpin.com> wrote:
>> 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().
>
> When an edit is made, the value is incremented.
>
>
> Rob Church 






More information about the MediaWiki-l mailing list