<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Marc-André ,</div>
<div><br>
</div>
<div>Try setting the ows_extent metadata parameter for the layer (you can make it world extents). MapServer, when it doesn't know the extents of a layer will issue a query to get those extents and it can be quite expensive for some layers. So you can populate
 your metadata with the extents to avoid this lookup.</div>
<div><br>
</div>
<div>Mike</div>
<div><br>
</div>
<div>
<div>
<div>
<div>--&nbsp;</div>
<div>Michael Smith</div>
</div>
<div>US Army Corps</div>
<div>Remote Sensing GIS/Center</div>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Marc-André Trottier &lt;<a href="mailto:marcandre_trottier@hotmail.com">marcandre_trottier@hotmail.com</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Tue, 29 Nov 2011 18:05:46 -0500<br>
<span style="font-weight:bold">To: </span>&lt;<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[mapserver-users] wfs request getfeature with polygon<br>
</div>
<div><br>
</div>
<p>! i'm doing a WFS GetFeature request with a polygon.<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 :</p>
<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;),'NDR'),'hex')
 as geom,&quot;objectid&quot; from msss_v_sgs_p where geom_p &amp;&amp; GeomFromText('POLYGON((-1100000 -23500,-1100000 2253500,1100000 2253500,1100000 -23500,-1100000 -23500))',find_srid('','msss_v_sgs_p','geom_p'))</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</p>
<p>marc-andre trottier</p>
_______________________________________________ mapserver-users mailing list <a href="mailto:mapserver-users@lists.osgeo.org">
mapserver-users@lists.osgeo.org</a> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">
http://lists.osgeo.org/mailman/listinfo/mapserver-users</a> </span>
</body>
</html>