[postgis-users] Accelerating spatial queries

trevorw trevorw at fanweb.ca
Tue Aug 15 14:10:29 PDT 2006


I've discovered that in cases when one is overlaying a moderate number
of points (6,000 - 80,000) against an area file with a limited number
(1 - 50) of polygons, significant performance gains can be achieved by
cutting apart the target polygons with a grid. My assumption is that
this gives smaller bounding boxes and gives better performance using the
a.the_geom && b.the_geom statement prior to contains or other functions.

Now when doing this on an ongoing basis, it is simple to create a layer
that is cut into blocks to speed performance. It might however be nice
to create a function that would create a temporary table on the fly
which would enable this performance gain without having to manually
generate duplicates of different spatial layers in the system. Has
anyone considered or implemented this kind of optimization?

T
-- 
Trevor Wiens
trevorw at fanweb.ca



More information about the postgis-users mailing list