Last modified: 2011-03-13 18:04:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T2508, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 508 - Article credits/attributions uses wrong index
Article credits/attributions uses wrong index
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.3.x
All All
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-17 10:29 UTC by Jamesday
Modified: 2011-03-13 18:04 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jamesday 2004-09-17 10:29:41 UTC
The code which runs this query needs to have use index(name_title_timestamp)
added. The MySQL query optimiser sometimes selects the namespace key, which is
fatally slow on old. Which is chosen seemed unpredictable, varying at different
times on the same server and different servers.

SELECT old_user, old_user_text,
user_real_name, MAX(old_timestamp) as timestamp
FROM old LEFT JOIN user ON old.old_user = user.user_id
WHERE old.old_namespace = 0 AND old.old_title = "August_10"
AND old.old_user != 82928 GROUP BY old.old_user
ORDER BY timestamp DESC;
+----------+-------------------+----------------+----------------+
| old_user | old_user_text     | user_real_name | timestamp      |
+----------+-------------------+----------------+----------------+
|      176 | Mark              |                | 20040907073128 |
|    95144 | Krin              |                | 20040824000930 |
|       62 | Maveric149        |                | 20040812041236 |

As a partial protection against this I've set max_seeks_for_key=10000 on the
Wikimedia servers. This should make this and similar cases prefer the index.
This query is also added to servmon/querybane for auto-kill if it causes other
queries to back up.
Comment 1 Jamesday 2005-11-12 23:16:14 UTC
assuming that this is resolved - since it uses old it's at 
least not applicable to 1.5 directly.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links