[Solved] query taking too much time with irritated performance [closed]
You don’t indicate any indexes. You will need them to improve performance. OK, I don’t understand the part after the semi-colon, so I’ll ignore that. Your whole query does a count(*) of a sub select, but you are doing a bunch of aggregation in the sub-query (calling SUM) which is work the database doesn’t have … Read more