Hello to all,<br><br>I'm developing some spatial queries and have these questions:<br><br>1)  When one makes an Explain Select request, is there any consideration given to the computational efficiencies<br>of the Postgis functions themselves composing  the query?    I doubt it, but want to make sure.  I assume selection and optimization<br>
of the Postgis query functions is independent of the db query design. <br><br>2)  I have a polygon defined by a hundred points  an external point, and wish to calculate an approximate point on the polygon<br>closest to the external  point.  Assuming the error is acceptable, is it more computationally efficient to calculate on the bounding box than the polygon itself? <br>
<br>a)     papprox  = ST_closestpoint( thegeom(polygon), p_ext)    or<br><br>b)     papprox = ST_closestpoint(box2d(thegeom(polygon), p_ext)    ??<br><br><br>3)  I have a table of geometries and wish to make combinatorial queries like:<br>
<br>SELECT(a.thegeom, b.thegeom, c.thegeom, etc..    WHERE   a.thegeom and b.thegeom touch <br>fixed points y and z  and c.thegeom intersects geometries   a and b.    Which is a better approach:<br><br>a)  build temporary tables for a and b geoms, then find c geoms that intersect the entries in the temporary tables    or<br>
<br>b)  perform one select  and interate through all the combinations.   The number of combinatorials goes exponential very quickly.  If one builds temporary <br>tables, how is the spatial index best transferred from original table to the temporary ones ? Does one have to rebuild the index from scratch.<br>
<br>thanks,<br><br>Tom<br><br><br><br><br>