Change collationUpdate batch size from 1000 to 50
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 8 Mar 2011 21:21:08 +0000 (21:21 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 8 Mar 2011 21:21:08 +0000 (21:21 +0000)
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.

maintenance/updateCollation.php

index 6631557..30b95a5 100644 (file)
@@ -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();