[mapserver-dev] WFS GetFeature Performance - BBOX vs. Filter

Jeff McKenna jmckenna at gatewaygeomatics.com
Fri Oct 14 08:02:07 EDT 2011


Not sure if this is related: I am noticing that for database queries 
with MS 6.0.1 through OGC (WMS/WFS) you must set "ows_extent" for each 
layer in your mapfile - this issue used to exist for just Oracle 
connections, but now I have seen it for SDE and Postgres as well.

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 11-10-13 3:50 PM, myOpenLayersUName wrote:
> Hello Mapserver-Dev folks,
>
> I'm hoping someone can comment on something I'm seeing that I can't
> understand.
>
> I'm getting significantly different results in terms of performance when I
> make what is essentially the same WFS GetFeature request with two different
> parameters to define the area to use for the query. The differences are
> quite spectacular. If I use a Bbox parameter, I get an answer back in
> seconds. If I use a Filter parameter, it takes minutes (the layer has around
> 1 million records and I'm accessing it through SDE). The responses for each
> are correct (2 features' coordinates and attributes); it's just the times to
> complete the query that are so different. I've also tried this on a
> Shapefile with a million records and it takes 1-2 seconds to get a response
> using a BBOX and over a minute using the filter.
>
> We'd prefer to use the Filter parameter because our application is supposed
> to support the use of more complex polygons as well as bounding boxes, but
> these differences are pretty significant and may require that we re-think
> support for WFS GetFeature requests with more complex polygons.
>
> I am working with MapServer 6.0.1 that includes Changeset 12031 (to allow me
> to query through SDE without seg-faulting) and 4011.patch (to allow me to
> use the maxFeatures parameter).
>
> Any info regarding why these times are so different and what, if anything, I
> can do to reduce them (perhaps my filter definition is atypical somehow?)
> would be greatly appreciated.
>
> Cheers,
> jtm
>
>
> /mapserv/httpd/cgi-bin/mapserv -nh
> "QUERY_STRING=map=/data/nl18/httpd/apps/myApp/map/myMap.map&service=wfs&version=1.0.0&request=getfeature&typename=myLayer&srsName=EPSG:26914&filter=%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%3Cogc%3ABBOX%3E%3Cogc%3APropertyName%3EmsGeometry%3C%2Fogc%3APropertyName%3E%3Cgml%3AEnvelope%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%20srsName%3D%22EPSG%3A26914%22%3E%3Cgml%3AlowerCorner%3E435309.38597013%205522753.8537993%3C%2Fgml%3AlowerCorner%3E%3Cgml%3AupperCorner%3E437373.1348557%205523970.9364754%3C%2Fgml%3AupperCorner%3E%3C%2Fgml%3AEnvelope%3E%3C%2Fogc%3ABBOX%3E%3C%2Fogc%3AFilter%3E&maxFeatures=10"
>
> - and -
>
> /mapserv/httpd/cgi-bin/mapserv -nh
> "QUERY_STRING=map=/data/nl18/httpd/apps/myApp/map/myMap.map&service=wfs&version=1.0.0&request=getfeature&typename=myLayer&bbox=435309.38597013,5522753.8537993,437373.1348557,5523970.9364754&maxFeatures=10"
>
>
>


More information about the mapserver-dev mailing list