Reduce disruption during updateCollation.php
authorTim Starling <tstarling@wikimedia.org>
Tue, 12 Mar 2013 00:26:12 +0000 (11:26 +1100)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 12 Mar 2013 23:08:29 +0000 (23:08 +0000)
commita43f751cf6b6849edddc0a6504553330aef8912e
treed600f5b98db84c7f63558411020b26ab14ce89c7
parentf9f32542f1214db0642726c9a2cdbfef3d643a77
Reduce disruption during updateCollation.php

Have updateCollation.php order by cl_to, so that each category is
updated all at once. This minimises the time during which a category
will appear to be incorrectly sorted, while the maintenance script is in
progress.

Mark the cl_collation index as needing deletion, it was always pretty
pointless. You can't do much better than a full table scan when you're
changing the collation value on a wiki.

Increase the batch size since the lack of a cl_to,cl_from index means
that it will have to filesort each category. A larger batch size means
less sorts. As noted by Liangent on bug 45970, you can't order by
cl_sortkey since that will change during execution.

Also fix an inappropriate use of $wgMiserMode and remove a no-op from
the SET clause of the UPDATE.

Very lightly tested.

Change-Id: I19bc8d6701f5f78040aa9c521427ac98ef488d89
maintenance/tables.sql
maintenance/updateCollation.php