jenkins-bot has submitted this change and it was merged.

Change subject: Reduce use of FORCE INDEX in LogPager
......................................................................


Reduce use of FORCE INDEX in LogPager

* This currently hurts some change tag queries by orders of mangitude.
  MySQL/Maria query planning is also a fair bit smarter than it used to
  be. Lastly, WMF table statistics are better maintained now.

Change-Id: I4d0ac7a35c9cec6b47771aae718b44bfc03bdfbe
---
M includes/logging/LogPager.php
1 file changed, 5 insertions(+), 8 deletions(-)

Approvals:
  Springle: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php
index 3fb7b89..f8403ca 100644
--- a/includes/logging/LogPager.php
+++ b/includes/logging/LogPager.php
@@ -253,16 +253,13 @@
                # the choices of available indexes. This mainly
                # avoids site-breaking filesorts.
                } elseif ( $this->title || $this->pattern || $this->performer ) 
{
-                       $index['logging'] = array( 'page_time', 'user_time' );
-                       if ( count( $this->types ) == 1 ) {
-                               $index['logging'][] = 'log_user_type_time';
-                       }
+                       $index['logging'] = array( 'page_time', 'user_time', 
'log_user_type_time' );
                } elseif ( count( $this->types ) == 1 ) {
-                       $index['logging'] = 'type_time';
-               } else {
-                       $index['logging'] = 'times';
+                       $index['logging'] = 'type_time'; // @TODO: sucks for 
change tags
                }
-               $options['USE INDEX'] = $index;
+               if ( count( $index ) ) {
+                       $options['USE INDEX'] = $index;
+               }
                # Don't show duplicate rows when using log_search
                $joins['log_search'] = array( 'INNER JOIN', 'ls_log_id=log_id' 
);
 

-- 
To view, visit https://gerrit.wikimedia.org/r/85097
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d0ac7a35c9cec6b47771aae718b44bfc03bdfbe
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to