<div>I haven&#39;t done any performance testing.  I was just looking to understand how to best structure my code/queries to insure that it will continue to work well with extremely large datasets.</div>
<div> </div>
<div> </div>
<div> </div>
<div><br> </div>
<div class="gmail_quote">On Thu, Feb 11, 2010 at 11:50 AM, Even Rouault <span dir="ltr">&lt;<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Le Thursday 11 February 2010 19:53:41 Frank Warmerdam, vous avez écrit :<br><br>Craig,<br><br>Since GDAL 1.6.0, spatial filtering on layers returned by ExecuteSQL() should<br>
be rather fast (<a href="http://trac.osgeo.org/gdal/changeset/14291" target="_blank">http://trac.osgeo.org/gdal/changeset/14291</a>). I see a<br>OGRPGResultLayer::SetSpatialFilter() method that appends an intersection test<br>
to the SQL request, similarly to what is done in OGRPGTableLayer. This is<br>only true if the code was able to determine the SRID of the geometry column<br>returned by your SQL request. Maybe your request is too complex for that ?<br>
<br>Best regards,<br><font color="#888888"><br>Even<br></font>
<div>
<div></div>
<div class="h5"><br>&gt; Miller, Craig wrote:<br>&gt; &gt; I was browsing the PostGIS  driver code today and noticed that when used<br>&gt; &gt; with ExecuteSQL the spatial filters appear to be getting applied on the<br>
&gt; &gt; client side instead of the PostGIS side.  Am I understanding the code<br>&gt; &gt; correctly?<br>&gt;<br>&gt; Craig,<br>&gt;<br>&gt; Yes, that is correct.  When using ExecuteSQL() we pass on the SQL<br>&gt; directly without alternation which means we need to do the spatial<br>
&gt; query manually after the fact.<br>&gt;<br>&gt; On the other hand, when you access postgres/postgis through a normal<br>&gt; OGRLayer, we do attempt to incorporate the spatial and attribute filters<br>&gt; into the internally generated SQL used to read the features.<br>
&gt;<br>&gt; Best regards,<br><br><br></div></div></blockquote></div><br><br clear="all"><br>-- <br>Craig Miller<br>Geospatial Software Architect<br>