Results within radius - Optimising slow MySQL query

后端 未结 2 1415
温柔的废话
温柔的废话 2020-12-22 09:38
SELECT property.paon, property.saon, property.street, property.postcode, property.lastSalePrice, property.lastTransferDate,
 epc.ADDRESS1, epc.POSTCODE, epc.TOTAL_FL         


        
2条回答
  •  粉色の甜心
    2020-12-22 10:02

    Do you control the database? If you do, you could try adding indexes on the address and postcode columns (anything in the join clause). That should probably speed up the query.

    Edit: reread your question.

    If the GROUP BY and ORDER BY clauses are slowing it down, I would try adding indexes on the columns referenced in those clauses.

提交回复
热议问题