WFS performance issue

Steve Lime steve.lime at DNR.STATE.MN.US
Thu Feb 3 20:44:56 EST 2005


Welcome to mapserver-dev. I'm just confirming a few things.

"This featurebug only develops into a real problem when the underlying
data gets large."

Actually the fact that a spatial filter is applied first isn't the
problem. If it falls back on the extent set in the mapfile that's just
setting all features as potential candidates which is what you want. The
problem is the fact that there are lots of features and the WFS
implementation isn't using the underlying database. MapServer is forced
to loop through all the features- yuck. Frank posted a seperate message
with a proposed solution but it will only help if the WFS code is
changed.

"What happens if I don't specifically set a spatial filter? MapServer
probably defaults to the WFS_EXTENT of the MAP file - is that true? I
could set a tiny little bbox in the wfs_extent as a workaround - but
then
objects only within that region could be found? Any faults in my
thinking?"

True. Again not setting the spatial filter and having the extent cover
all features is what you want. Query optimization is what not setting a
spatial extent might get you. For shapefiles, for example, that would
have little effect on performance.

The performance fix is writing native FILTERs based on WFS input.

Steve

>>> "Arnulf Christl (CCGIS)" <arnulf.christl at CCGIS.DE> 02/02/05 7:08 AM
>>>
Hi,
had a littel listserv problem, but it seems like i receive dev mails now
too.

Please confirm whether I got this right: All WFS request going through
MapServer get a spatial filter prior to asking the database. If I select
a
region thats fine, because then I explicitly specify a bbox. But this
does
not make sense if the query is non-spatial for alphanumerical data only.
This featurebug only develops into a real problem when the underlying
data
gets large.

What happens if I don't specifically set a spatial filter? MapServer
probably defaults to the WFS_EXTENT of the MAP file - is that true? I
could set a tiny little bbox in the wfs_extent as a workaround - but
then
objects only within that region could be found? Any faults in my
thinking?

Asseffa
we have several PG/PostGIS running on FreeBSD, Debian, SuSE and
Mandrake,
just recently we added a PG 8.0 for Windoze (runs fine, PostGIS even is
an
option in the setup - cool thing!).
Oracle is a license, version, maintenance (and pain) problem. But we
have
several customers who use it and might let us do some testing.

For the problem at hand it wouldn't even make a difference, because both
databases show the same performance problem.

Tell us what you need to get tested.

Best Arnulf.



More information about the mapserver-dev mailing list