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