Manual:runBatchedQuery.php

From Linux Web Expert

Revision as of 04:52, 6 December 2023 by imported>FuzzyBot (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 <translate> Required</translate>
--set SET clause <translate> Required</translate>
--key Column name, the values of which are unique <translate> Required</translate>
--where WHERE clause <translate> Optional</translate>
--batch-size Batch size <translate> Optional</translate> 1000
--db Database name, or omit to use the current wiki. <translate> Optional</translate> current wiki db

Usage

php maintenance/runBatchedQuery.php --table tableName --key columnName --set newValue [ --where| --batch-size| --db ]

See also