From: Aryeh Gregor Date: Tue, 8 Mar 2011 21:21:08 +0000 (+0000) Subject: Change collationUpdate batch size from 1000 to 50 X-Git-Tag: 1.31.0-rc.0~31551 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=8c69bdb0a6f4c186168c032fa87d55ccc1da8f4b;p=lhc%2Fweb%2Fwiklou.git Change collationUpdate batch size from 1000 to 50 It selects that many rows, then does PHP processing and an individual update query for each one. This is not a good idea when each batch is done in a single transaction: 1000 MySQL updates interspersed with PHP processing might take a second or more while locks are held. --- diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 66315575c5..30b95a53de 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -29,7 +29,7 @@ require_once( dirname( __FILE__ ) . '/Maintenance.php' ); class UpdateCollation extends Maintenance { - const BATCH_SIZE = 1000; + const BATCH_SIZE = 50; public function __construct() { parent::__construct();