So I am trying to get some geographical data at the moment from the some 34 thousand records we have.
We stored a records of Person, which include the basics like firstname, surname, address and postcode.
I am wanting to get information about the postcode, and link it with their Longitue and Latitude co-ordinates. For this, i also have a table with australian postcodes, and their Long/Lat coords.
SELECT count(p.postcode) AS `count`, p.postcode, pctlt.Lat, pctlt.`Long`
FROM person AS p
INNER JOIN pcodetolonglat AS pctlt ON pctlt.Pcode = p.postcode
WHERE length(p.postcode)=4
GROUP BY p.postcode
currently, this script takes between one too two minutes to run,
Is there a more efficient way to get the same results?