r83761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83760‎ | r83761 | r83762 >
Date:15:05, 12 March 2011
Author:midom
Status:resolved (Comments)
Tags:live 
Comment:
....... .................. ......
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/FlaggedRevs/specialpages/PendingChanges_body.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/FlaggedRevs/specialpages/PendingChanges_body.php
@@ -411,7 +411,7 @@
412412 'tables' => $tables,
413413 'fields' => $fields,
414414 'conds' => $conds,
415 - 'options' => array( 'USE INDEX' => $useIndex )
 415+ // 'options' => array( 'USE INDEX' => $useIndex )
416416 );
417417 }
418418

Follow-up revisions

RevisionCommit summaryAuthorDate
r84041Removed FORCE INDEX statements; more harmful than the possible modest filesor...aaron18:25, 15 March 2011

Comments

#Comment by Midom (talk | contribs)   15:11, 12 March 2011

I mean, of course you should prefer to scan millions of rows instead of sorting zero, right?

#Comment by Aaron Schulz (talk | contribs)   16:24, 12 March 2011

Where is "millions" coming from?

#Comment by Midom (talk | contribs)   17:59, 12 March 2011
  1. of entries in the table multiplied by tables joined, mostly. Or also hypothetical amount of rows in single table too!
#Comment by Aaron Schulz (talk | contribs)   00:13, 13 March 2011

flaggedpages WHERE fp_pending_since = NULL shouldn't require scanning anything close to millions (if the index is used), nor should scanning the flaggedpages_pending table.

I suppose one could pathologically imagine millions of pages needing review, but I was more concerned about what mysql does when "in category X" and (less so) "on my watchlist" JOINs are tossed in.

#Comment by Midom (talk | contribs)   01:01, 13 March 2011

your thought is based on assumption that community is not a bunch of slackers and review changes immediately.

and yes, there're >100k pages needing review, and exactly "in category" and "on my watchlist" queries were super-expensive

#Comment by Aaron Schulz (talk | contribs)   01:42, 13 March 2011

Some wikis have 100k pages, I know. I've looked at that stats before :)

I didn't want the category/watchlist case to filesort to get the timestamp ordering right.

#Comment by Midom (talk | contribs)   01:45, 13 March 2011

filesorting hundred or thousand rows is cheaper than scanning hundreds of thousands of rows - we do filesorts for watchlists already, rather than scanning full recentchanges

#Comment by Aaron Schulz (talk | contribs)   00:43, 13 March 2011

Gah,I meant "WHERE fp_pending_since IS NOT NULL" :)

Status & tagging log