WFS performance issue

Steve Lime steve.lime at DNR.STATE.MN.US
Tue Feb 1 19:58:30 EST 2005


Agree'd, I see the problem says the blind man, yuck. Using the FILTER
mechanism will be *much* more efficient. Perhaps we could implement a
driver specific MapServer expression to native expression translators.
The WFS code could stay "as is" for the most part but using FILTER with
the translator called in msQueryUsingAttributes... Just a thought.

Steve

>>> Yewondwossen Assefa <assefa at DMSOLUTIONS.CA> 02/01/05 2:11 PM >>>
Frank Warmerdam wrote:

> On Tue, 01 Feb 2005 13:34:47 -0500, Yewondwossen Assefa
> <assefa at dmsolutions.ca> wrote:
>
>>Just some info on how the WFS GetFeature with <Filter> is done
>>internally in mapserver :
>>   the <Filter> part is transformed into mapserver class expressions
and
>>then a normal spatial query (querybyrect or querybypoint) is
performed.
>
>
> Assefa,
>
> When you say it is turned into a mapserver class expression, where
> it is set?  Is a CLASS setup on the layer with this as it's
EXPRESSION?
> Does the WFS code then classify all features, and only return those
> matching this query class?
>

  Yes :  I meant the class's object expression is the one used.

   Once the class expression's are set, a regular mapserver spatial
query is called. Inside the query code there is a checking performed to
see if a "candidate" feature (element inside the spatial query) meets
one of the classe's expressions and if that is the case, this element is
selected. The WFS code will then output the selected features.


> Would it make sense to try and use the layer level filter?
>
> As implemented now, aren't we pretty much trapped into evaluating
> all features withi mapserver instead of allowing underlying RDBMS's
> to do the attribute searches quickly?   Is this how we will be leaving
> things indefinately?
>
> I am concerned that it is very hard for folks with large datasets in
> a database to take advantage of some of MapServers features
> efficiently when we just fallback to reading everything and evaluating
> alots of stuff in MapServer.
>

I understand your concern. Using the layer filter would be appropriate
but  custum code would be necessary for diffrent type of drivers.  I am
willing to rework the WFS part of the code if peopole are willing to
proivide help in testing the diffrent formats ( I do not have access to
Oracle or even PostGIS locally so testing will be a bit difficult).

I think, we should maybe move this discussion to a bug and work the
details through it.

>
>>If the <Filter> is soemhow complex (ex It contains several spatial
>>queries plus attribute queries), the <Filter> is broken into several
>>small pieces and then  queries are done for each piece and the results
>>are  merged to provide the final set of results.
>
>
> Whew, that must have been a bit of work.
>
> Best regards,


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-dev mailing list