One reson I see there is a problem is because of all the LEFT JOINS in the query which is very resource intensive.