r79309 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79308‎ | r79309 | r79310 >
Date:01:04, 31 December 2010
Author:aaron
Status:deferred
Tags:
Comment:
Improve index usage w.r.t to p.flaggedrevs JOIN. The last flagging time of a previous rev doesn't matter (and isn't unused) - only the fact that such a rev was flagged.
Modified paths:
  • /trunk/extensions/FlaggedRevs/maintenance/updateStats.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc
@@ -211,10 +211,10 @@
212212 # For edits that started off pending, how long do they take to get reviewed?
213213 # Edits started off pending if made when a flagged rev of the page already existed.
214214 # Get the *first* reviewed rev *after* each edit and get the time difference.
215 - list($revision,$flaggedrevs) = $dbr->tableNamesN('revision','flaggedrevs');
 215+ list( $revision, $flaggedrevs ) = $dbr->tableNamesN( 'revision', 'flaggedrevs' );
216216 $sql = "
217217 SELECT
218 - MIN(rev_timestamp) AS rt, MAX(p.fr_timestamp) AS pft, MIN(n.fr_timestamp) AS nft
 218+ MIN(rev_timestamp) AS rt, MIN(n.fr_timestamp) AS nft, MAX(p.fr_rev_id)
219219 FROM $revision
220220 INNER JOIN $flaggedrevs AS p FORCE INDEX (PRIMARY) ON
221221 (p.fr_page_id = rev_page AND p.fr_rev_id < rev_id AND p.fr_timestamp < rev_timestamp)

Status & tagging log