我想优化下面的查询:
SELECT
a.id, a.pay_point_name, a.pay_point_location,
COUNT(b.id) AS countedCustomers,
SUM(b.approved) AS summedLoans,
SUM(c.deduction) AS summedDeductions
FROM
pay_tbl a
LEFT JOIN
customer_tbl b
ON b.employer = a.pay_point_name
LEFT JOIN
loans_tbl c
ON c.paypoint = a.pay_point_name
GROUP BY
a.pay_point_name
ORDER BY
NULL
当前执行时间:161.2s
我想知道如何最好地优化这个查询并减少执行时间。