From: Brad Jorsch Date: Tue, 12 Jul 2016 15:29:04 +0000 (-0400) Subject: API: Remove index forcing in ApiQueryRecentChanges X-Git-Tag: 1.31.0-rc.0~6382^2 X-Git-Url: http://git.cyclocoop.org/data/modifier.php?a=commitdiff_plain;h=2f1cfcf306bb3239c4c820e38a144750392dd520;p=lhc%2Fweb%2Fwiklou.git API: Remove index forcing in ApiQueryRecentChanges It's preventing better indexes from being chosen; hopefully removing it doesn't cause worse indexes to be chosen anymore in other cases. Bug: T140108 Change-Id: Iee480e221dc26f89e8583be5f26c6571b240e390 --- diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index f0fd2f4574..63c95d3675 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -150,7 +150,6 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { * AND rc_timestamp < $end AND rc_namespace = $namespace */ $this->addTables( 'recentchanges' ); - $index = [ 'recentchanges' => 'rc_timestamp' ]; // May change $this->addTimestampWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] ); if ( !is_null( $params['continue'] ) ) { @@ -246,7 +245,6 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { if ( !is_null( $params['user'] ) ) { $this->addWhereFld( 'rc_user_text', $params['user'] ); - $index['recentchanges'] = 'rc_user_text'; } if ( !is_null( $params['excludeuser'] ) ) { @@ -362,7 +360,6 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase { $this->token = $params['token']; $this->addOption( 'LIMIT', $params['limit'] + 1 ); - $this->addOption( 'USE INDEX', $index ); $count = 0; /* Perform the actual query. */