In the stimmberechtigung tool on Toolforge, we are using this query to determine the timestamp of the first edit of a user: SELECT rev_timestamp FROM revision_userindex WHERE rev_user=? ORDER BY rev_timestamp ASC LIMIT 1;
This query used to be really fast, but currently it takes up to several minutes to execute. What causes the longer execution time, and how can I speed up the query?
Example:
MariaDB [dewiki_p]> SELECT rev_timestamp FROM revision_userindex WHERE rev_user=409049 ORDER BY rev_timestamp ASC LIMIT 1; +----------------+ | rev_timestamp | +----------------+ | 20070610153454 | +----------------+ 1 row in set (2 min 8.86 sec)