in dewiki_p database (connected to labsdb1010) the following query seems to take 3 hours
SELECT DISTINCT pl_title FROM pagelinks LEFT JOIN page ON page_title = pl_title AND page_namespace = pl_namespace WHERE pl_from_namespace = 0 AND pl_namespace = 0 AND page_id IS NULL AND pl_title LIKE 'P%';
When I replace the last part to a different letter, like
SELECT DISTINCT pl_title FROM pagelinks LEFT JOIN page ON page_title = pl_title AND page_namespace = pl_namespace WHERE pl_from_namespace = 0 AND pl_namespace = 0 AND page_id IS NULL AND pl_title LIKE 'O%';
it is much faster:
72625 rows in set (1 min 29.13 sec)
Maybe it is important, that two days ago, on May 28th that long running query finished with in a minute. So something odd happend here