ApiQueryLogEvents: when user is specified, omit STRAIGHT_JOIN
Otherwise it tries to scan the whole logging table, joining every row on actor. Bug: T282122 Change-Id: Ia34897a496656e0d0d26f9e038b1edb0377c461e
This commit is contained in:
parent
35c0a9b783
commit
cd6c7786a4
1 changed files with 2 additions and 1 deletions
|
|
@ -245,7 +245,8 @@ class ApiQueryLogEvents extends ApiQueryBase {
|
|||
// `logging` and filesorting is somehow better than querying $limit+1 rows from `logging`.
|
||||
// Tell it not to reorder the query. But not when `letag` was used, as it seems as likely
|
||||
// to be harmed as helped in that case.
|
||||
if ( $params['tag'] === null ) {
|
||||
// If "user" was specified, it's obviously correct to query actor first (T282122)
|
||||
if ( $params['tag'] === null && $user === null ) {
|
||||
$this->addOption( 'STRAIGHT_JOIN' );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue