there is my POST : <br><br><code class="focusRow subFocusRow "><wfs:GetFeature xmlns:wfs="<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>" service="WFS" version="1.1.0" xsi:schemaLocation</code><code class="focusRow subFocusRow ">="<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>" xmlns:xsi="<a href="http://www.w3.org">http://www.w3.org</a></code><code class="focusRow subFocusRow ">/2001/XMLSchema-instance"><wfs:Query typeName="ms:MSSS_SGS_P" srsName="EPSG:32198"><ogc:Filter xmlns</code><code class="focusRow subFocusRow ">:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>"><ogc:Intersects><ogc:PropertyName>geometry</ogc:PropertyName><gml:Polygon</code><code class="focusRow subFocusRow "> xmlns:gml="<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>" srsName="EPSG:32198"><gml:exterior><gml:LinearRing><gml:posList</code><code class="focusRow subFocusRow ">>-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</gml:posList></code><code class="focusRow subFocusRow "></gml:LinearRing></gml:exterior></gml:Polygon></ogc:Intersects></ogc:Filter></wfs:Query></wfs:GetFeature</code><code tabindex="0" class="focusRow subFocusRow a11yModified">><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"><<a href="mailto:Steve.Lime@state.mn.us">Steve.Lime@state.mn.us</a>></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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Steve<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";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:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <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'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's log give me this SQL :<u></u><u></u></div></div><p></p><div><div class="h5">
<p>select "nom","adresse","postal","code","telephone","postal0","etab_code","etab_nom","rss_code","rss_nom","rls_code","rls_nom","clsc_code","clsc_nom","mun_code","mun_nom","longitude","latitude","sgs","hsld","clsc","pdi","pdp","pat","cj","sp","objectid","nom_commun",encode(ST_AsBinary(ST_Force_2D("geom_p"),'NDR'),'hex')
 as geom,"objectid" from msss_v_sgs_p where geom_p && GeomFromText('POLYGON((-1100000 -23500,-1100000 2253500,1100000 2253500,1100000 -23500,-1100000 -23500))',find_srid('','msss_v_sgs_p','geom_p'))<u></u><u></u></p>

<p>So my question, Why is mapserver does a spatial query with the layer'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>