I have many many points and want to calculate the shortest distance from each point to the closest line of a table with many many lines. I think my underneath code is correct, I however never get an answer because pgadmin just keeps 'waiting for query execution to complete'. How can I optimize this underneath script?
SELECT
max(br.id), max(to_timestamp(br.time)), max(at.linknummer),
min(ST_Distance(st_transform(br.geom,3857), at.geometry))
FROM
schema1.data1 AS br,
schema2.data2 AS at
GROUP BY
br.id, br.time
No comments:
Post a Comment