How to speed up this query?

Original text of this message