RecentChange: Make join to comment table also straight

The optimizer is refusing to pick the right join order

Bug: T311360
Change-Id: I742201b45975a5edcac5d4634d70d50ee851f0ac
This commit is contained in:
Amir Sarabadani 2022-06-30 23:38:30 +02:00
parent 82731997a1
commit f24eb94571

View file

@ -259,6 +259,8 @@ class RecentChange implements Taggable {
*/
public static function getQueryInfo() {
$commentQuery = CommentStore::getStore()->getJoin( 'rc_comment' );
// Optimizer sometimes refuses to pick up the correct join order (T311360)
$commentQuery['joins']['comment_rc_comment'][0] = 'STRAIGHT_JOIN';
return [
'tables' => [
'recentchanges',