r98577 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98576‎ | r98577 | r98578 >
Date:22:25, 30 September 2011
Author:aaron
Status:ok
Tags:
Comment:
Applied similar fix as r98569
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/FlaggedRevs/maintenance/updateStats.inc (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/FlaggedRevs/maintenance/updateStats.inc
@@ -216,16 +216,16 @@
217217 $sql = "
218218 SELECT
219219 MIN(rev_timestamp) AS rt, MAX(p.fr_timestamp) AS pft, MIN(n.fr_timestamp) AS nft
220 - FROM $revision
 220+ FROM $revision FORCE INDEX (user_timestamp)
221221 INNER JOIN $page FORCE INDEX (PRIMARY) ON
222222 (page_id = rev_page AND page_namespace IN ($reviewableNS))
223 - INNER JOIN $flaggedrevs AS p FORCE INDEX (PRIMARY) ON
 223+ INNER JOIN $flaggedrevs AS p FORCE INDEX (page_rev) ON
224224 (p.fr_page_id = page_id AND p.fr_rev_id < rev_id AND p.fr_timestamp < rev_timestamp)
225 - LEFT JOIN $flaggedrevs AS n FORCE INDEX (PRIMARY) ON
 225+ LEFT JOIN $flaggedrevs AS n FORCE INDEX (page_rev) ON
226226 (n.fr_page_id = page_id AND n.fr_rev_id >= rev_id AND n.fr_timestamp >= rev_timestamp)
227227 WHERE
228228 ((rev_user = 0) AND ($timeCondition) AND ((rev_id % $mod) = 0))
229 - GROUP BY rev_id";
 229+ GROUP BY rev_timestamp,rev_id";
230230 # Actually run the query...
231231 $res = $dbr->doQuery( $sql, __METHOD__ );
232232 $secondsR = 0; // total wait seconds for edits later reviewed

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98569Fixed totally broken query plan for anon edit stats....aaron21:31, 30 September 2011

Status & tagging log