Cross-posted to wikitech-l, please reply to one list only.
Wouter Steenbeek wrote:
>
> But there seems to be a technical defect on sco:. A few articles were
> created, among which some by Mark fyi, but the statistics ignore them...
> I was aiming to add the Scottish Wikipedia to the List of Wikipedias but
> I can't, for that reason.
For some reason (probably some theory of Jamesday's about great ways to
optimise selects on single-row tables), the query for the
{{NUMBEROFARTICLES}} tag looks like this:
$s = $dbr->selectRow( 'site_stats',
array( 'ss_total_views', 'ss_total_edits', 'ss_good_articles' ),
array( 'ss_row_id' => 1 ), $fname
i.e. using the new primary key in a way that's always meant to match.
For this latest batch of wikis, I created the site_stats row using:
INSERT INTO site_stats() VALUES ()
which creates a row with default values in every column. The default for
ss_row_id is 0. I'll fix this on these wikis shortly, I just thought it
was a nice example of the problems you can get when you optimise things
that don't really need optimising.
-- Tim Starling