there is my POST : <br><br><code class="focusRow subFocusRow ">&lt;wfs:GetFeature xmlns:wfs=&quot;<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>&quot; service=&quot;WFS&quot; version=&quot;1.1.0&quot; xsi:schemaLocation</code><code class="focusRow subFocusRow ">=&quot;<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd</a>&quot; xmlns:xsi=&quot;<a href="http://www.w3.org">http://www.w3.org</a></code><code class="focusRow subFocusRow ">/2001/XMLSchema-instance&quot;&gt;&lt;wfs:Query typeName=&quot;ms:MSSS_SGS_P&quot; srsName=&quot;EPSG:32198&quot;&gt;&lt;ogc:Filter xmlns</code><code class="focusRow subFocusRow ">:ogc=&quot;<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>&quot;&gt;&lt;ogc:Intersects&gt;&lt;ogc:PropertyName&gt;geometry&lt;/ogc:PropertyName&gt;&lt;gml:Polygon</code><code class="focusRow subFocusRow "> xmlns:gml=&quot;<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>&quot; srsName=&quot;EPSG:32198&quot;&gt;&lt;gml:exterior&gt;&lt;gml:LinearRing&gt;&lt;gml:posList</code><code class="focusRow subFocusRow ">&gt;-206501.9511156373 322690.6403888138 -222920.53608453833 315197.18794487417 -217872.36749086587 305166</code><code class="focusRow subFocusRow ">.3182788128 -205933.97268351325 315573.2833999051 -206501.9511156373 322690.6403888138&lt;/gml:posList&gt;</code><code class="focusRow subFocusRow ">&lt;/gml:LinearRing&gt;&lt;/gml:exterior&gt;&lt;/gml:Polygon&gt;&lt;/ogc:Intersects&gt;&lt;/ogc:Filter&gt;&lt;/wfs:Query&gt;&lt;/wfs:GetFeature</code><code tabindex="0" class="focusRow subFocusRow a11yModified">&gt;<br>
<br>we got some performance issues with 4 millions features.<br><br></code><br><div class="gmail_quote">2011/11/30 Lime, Steve D (DNR) <span dir="ltr">&lt;<a href="mailto:Steve.Lime@state.mn.us">Steve.Lime@state.mn.us</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">What exactly is the WFS filter being used? Only certain queries are done wholly in the database. Most often bbox tests<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">are done in the database with other work done in MapServer.  We hope to move more load off to the database<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">eventually. Are you seeing performance issues?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Steve<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Marc-André Trottier<br>
<b>Sent:</b> Tuesday, November 29, 2011 5:06 PM</span></p><div class="im"><br>
<b>To:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> [mapserver-users] wfs request getfeature with polygon<u></u><u></u></div><p></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p>! i&#39;m doing a WFS GetFeature request with a polygon.</p><div><div class="h5"><br>
Usually everything is fine. <br>
but for one table a got a enconding error with my data. (my problem) and the mapserver&#39;s log give me this SQL :<u></u><u></u></div></div><p></p><div><div class="h5">
<p>select &quot;nom&quot;,&quot;adresse&quot;,&quot;postal&quot;,&quot;code&quot;,&quot;telephone&quot;,&quot;postal0&quot;,&quot;etab_code&quot;,&quot;etab_nom&quot;,&quot;rss_code&quot;,&quot;rss_nom&quot;,&quot;rls_code&quot;,&quot;rls_nom&quot;,&quot;clsc_code&quot;,&quot;clsc_nom&quot;,&quot;mun_code&quot;,&quot;mun_nom&quot;,&quot;longitude&quot;,&quot;latitude&quot;,&quot;sgs&quot;,&quot;hsld&quot;,&quot;clsc&quot;,&quot;pdi&quot;,&quot;pdp&quot;,&quot;pat&quot;,&quot;cj&quot;,&quot;sp&quot;,&quot;objectid&quot;,&quot;nom_commun&quot;,encode(ST_AsBinary(ST_Force_2D(&quot;geom_p&quot;),&#39;NDR&#39;),&#39;hex&#39;)
 as geom,&quot;objectid&quot; from msss_v_sgs_p where geom_p &amp;&amp; GeomFromText(&#39;POLYGON((-1100000 -23500,-1100000 2253500,1100000 2253500,1100000 -23500,-1100000 -23500))&#39;,find_srid(&#39;&#39;,&#39;msss_v_sgs_p&#39;,&#39;geom_p&#39;))<u></u><u></u></p>

<p>So my question, Why is mapserver does a spatial query with the layer&#39;s extent?<br>
with a table of 2millions features, that,s very slow even with a spatial index<u></u><u></u></p>
<p>marc-andre trottier<u></u><u></u></p>
</div></div></div>
</div>

</blockquote></div><br>