Claudio V wrote:
Thanks for your quick reply. How did you get an index for "old_title"?
[[Special:Contributions]] doesn't use one.
However, as Brion mentioned, and as evidenced by your own output as well, there is a mutli-column index on both old_title and old_namespace. You should add "and old_namespace=0" to your query. (But you should probably also remove the "DISTINCT" keyword and instead do the filtering-out of duplicates in your favourite programming language.)
Timwi