https://bugzilla.wikimedia.org/show_bug.cgi?id=56029
Web browser: ---
Bug ID: 56029
Summary: Indexes on recentchanges
Product: Wikimedia Labs
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: tools
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
I'm currently trying to port one of my Toolserver tools and ran into a problem
with DB queries taking orders of magnitude longer on Tools than the TS.
The problem appears to be in queries of the type:
SELECT rc_timestamp FROM recentchanges WHERE rc_user_text='$username' ORDER BY
rc_timestamp DESC LIMIT 1
On the Toolserver:
mysql> SELECT rc_timestamp FROM recentchanges WHERE rc_user_text='MaxSem' ORDER
BY rc_timestamp DESC LIMIT 1;
+----------------+
| rc_timestamp |
+----------------+
| 20131009151959 |
+----------------+
1 row in set (0.02 sec)
On Tools:
MariaDB [enwiki_p]> SELECT rc_timestamp FROM recentchanges WHERE
rc_user_text='MaxSem' ORDER BY rc_timestamp DESC LIMIT 1;
+----------------+
| rc_timestamp |
+----------------+
| 20131009151959 |
+----------------+
1 row in set (7.38 sec)
Using rc_user instead makes little difference. The farther in the past the most
recent rc_timestamp is, the worse the performance (users with no edits in RC
take 10+ seconds). So I'm assuming the problem is an extra index that exists on
TS, but not on the Labs replicas.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l