How to optimize this query

Please don't triple post. This is also here