I need to find all buildings in radius of 25m from given location. I thought about 2 PostGis quires that can handle this, when I run it they both give same time execution. But I want to know which one of them is the more efficient way?
SELECT *FROM buildingsWHERE ST_Intersects(ST_Buffer(ST_Transform(ST_GeomFromText('POINT(lon lat)', 4326), 2163), 25), ST_Transform(buildings.geom, 2163));-----------SELECT *FROM buildingsWHERE ST_DWithin(ST_Transform(ST_GeomFromText('POINT(lon lat)', 4326), 2163), ST_Transform(buildings.geom, 2163), 25);
أكثر...
SELECT *FROM buildingsWHERE ST_Intersects(ST_Buffer(ST_Transform(ST_GeomFromText('POINT(lon lat)', 4326), 2163), 25), ST_Transform(buildings.geom, 2163));-----------SELECT *FROM buildingsWHERE ST_DWithin(ST_Transform(ST_GeomFromText('POINT(lon lat)', 4326), 2163), ST_Transform(buildings.geom, 2163), 25);
أكثر...