refreshLinks.php: Get IDs in batches in deleteLinksFromNonexistent()
authorKevin Israel <pleasestand@live.com>
Tue, 24 Feb 2015 02:16:23 +0000 (21:16 -0500)
committerPleaseStand <pleasestand@live.com>
Fri, 27 Feb 2015 15:16:48 +0000 (15:16 +0000)
commit40e300b8273dae00eff38b9c136747b595656017
tree4ab88a08bf2b153a0fe08ea5dceb0bf7b44cf540
parentfc883d8e932c79db466b376001a604ad3ba78c80
refreshLinks.php: Get IDs in batches in deleteLinksFromNonexistent()

... instead of making an unbuffered query, which is discouraged in the
doc comment for DatabaseBase::bufferResults().

Also used NOT IN for the antijoin instead of LEFT JOIN...IS NULL; when
combined with DISTINCT, the latter causes MySQL to use a temporary
table rather than an appropriate index, according to EXPLAIN. (Using
GROUP BY instead of DISTINCT also avoids this problem. I don't know why.)

Bug: T44180
Change-Id: Idca85fac7dd7879f9fbef2712b6aa83343099e02
maintenance/refreshLinks.php