I gave up onSELECT a.polyid, p.pointid FROM f_pnts p, f_pols a WHERE SDE.st_intersects(p.point,a.poly)=1;after ten minutes. When I dropped the polygon count by an order of magnitude,this "find points which overlap polys" query ran in 14.56 minutes....Note: The PostgreSQL optimizer works differently, so the equivalent query on SDE.ST_GEOMETRY in PG 9.1 returned in <45ms against 216k polygons, no matter the order, and completed in <50ms against 1.34m polygons.
SELECT a.polyid, p.pointid FROM f_pnts p, f_pols a WHERE SDE.st_intersects(p.point,a.poly)=1;
SELECT a.polyid, p.pointid FROM f_pnts p, f_pols a WHERE SDE.st_intersects(a.poly,p.point)=1;
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.