Manual:RunBatchedQuery.php
MediaWiki file: runBatchedQuery.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Classes: | BatchedQueryRunner |
Details
runBatchedQuery.php file is a maintenance script to run a database query in batches and wait for replica DBs. This is used on large wikis to prevent excessive replication lag when executing large write queries.
Options
Option | Description | Required | Default value |
---|---|---|---|
--table | Table name | Required | |
--set | SET clause | Required | |
--key | Column name, the values of which are unique | Required | |
--where | WHERE clause | Optional | |
--batch-size | Batch size | Optional | 1000 |
--db | Database name, or omit to use the current wiki. | Optional | current wiki db |
Usage
php maintenance/runBatchedQuery.php --table tableName --key columnName --set newValue [ --where| --batch-size| --db ]