From 2f1cfcf306bb3239c4c820e38a144750392dd520 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 12 Jul 2016 11:29:04 -0400 Subject: [PATCH] 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 --- includes/api/ApiQueryRecentChanges.php | 3 --- 1 file changed, 3 deletions(-) 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. */ -- 2.20.1