Skip to main content
5 events
when toggle format what by license comment
Oct 19, 2015 at 16:19 vote accept DenaliHardtail
Oct 12, 2015 at 18:15 comment added Vince The spatial index of the first parameter is used. If the first parameter is a constant, then the spatial query is a full table scan on the table of the second parameter. The real fun comes with a spatial join of two tables; when the spatial test may be different if you change the order (e.g., ST_Contains vs. ST_Within)
Oct 12, 2015 at 17:49 comment added DenaliHardtail @Vince Nice tip! A SELECT query we've been using went from 500ms to 115ms. How did you know to make that suggestion? I know geometry is indexed but how do you know switching the parameters would help?
Oct 12, 2015 at 17:41 comment added Vince You'll get better performance if you place the t1.SHAPE parameter first in the argument list (utilizing the index on the polygons table)
Oct 12, 2015 at 16:22 history answered DenaliHardtail CC BY-SA 3.0