Why the execution of a query is very slow using PostGis?

المشرف العام

Administrator
طاقم الإدارة
I'm applying this Query to 8257800 point but it's taking 15 hours and it didn't return a results.

SELECT a.gid , b.gid, st_distance(a.geom,b.geom)FROM shp1 a, shp2 bwhere st_intersects(st_difference(st_buffer(a.geom,2000),st_buffer(a.geom,500)),b.geom) and abs(a.value - b.value)>400Is there any suggestions to render this query fast?



أكثر...
 
أعلى