Index: branches/wmf/1.18wmf1/extensions/FlaggedRevs/dataclasses/FlaggedRevsStats.php |
— | — | @@ -309,13 +309,14 @@ |
310 | 310 | array( 'rev_user' => 0, $timeCondition, "(rev_id % $mod) = 0" ), |
311 | 311 | __METHOD__, |
312 | 312 | array( |
313 | | - 'GROUP BY' => 'rev_id', |
314 | | - 'USE INDEX' => array( 'p' => 'PRIMARY', 'n' => 'PRIMARY' ) |
| 313 | + 'GROUP BY' => array( 'rev_timestamp', 'rev_id' ), // user_timestamp INDEX used |
| 314 | + 'USE INDEX' => array( 'revision' => 'user_timestamp' ), // sanity; mysql picks this |
| 315 | + 'STRAIGHT_JOIN' |
315 | 316 | ), |
316 | 317 | array( |
317 | 318 | 'p' => array( 'INNER JOIN', array( // last review |
318 | 319 | 'p.fr_page_id = rev_page', |
319 | | - 'p.fr_rev_id < rev_id', |
| 320 | + 'p.fr_rev_id < rev_id', // not imported later |
320 | 321 | 'p.fr_timestamp < rev_timestamp' ) ), |
321 | 322 | 'n' => array( 'INNER JOIN', array( // next review |
322 | 323 | 'n.fr_page_id = rev_page', |