Mapserver and SDE, one trivial question, one informational question

Howard Butler hobu at IASTATE.EDU
Mon Mar 14 17:21:07 EST 2005


Forgot to cc the list ;)



At 4:15 PM -0600 3/14/05, Howard Butler wrote:
>Saul,
>
>>
>>I have tried many different EXPRESSION lines in the CLASS section.  Here
>>are some examples:
>>EXPRESSION "[ADMIN_TYPE] =3D 1"
>>EXPRESSION "'[ADMIN_TYPE]' =3D 1"
>>EXPRESSION "'[ADMIN_TYPE]' =3D '1'"
>>EXPRESSION "'[ADMIN_TYPE]' eq 1"
>>EXPRESSION "'[ADMIN_TYPE]' eq '1'"
>>EXPRESSION "'[ADMIN_TYPE]' IN '1'"
>>EXPRESSION "'[ADMIN_TYPE]' LIKE '%1%'"
>>
>>Etc.
>>
>>I've tried all the combinations of attribute name and quotes/operators I
>>can think of.  I've tried the attribute name fully qualified, partially
>>qualified and unqualified (as above).
>>
>>In all cases, I get a completely blank map, as though no features are
>>selected by the expression.  Any hints on what I should be putting in
>>for the expression?  Are Expressions supported in SDE layers?
>
>Expressions are supported, and I've often had some trouble getting
>them to go as well.  Here is an example that works for me.  Also, as
>you are already doing, make sure to have a filter set to query out
>the NULL values or the expression parser will choke on them.
>
>     CLASS
>         NAME "My class"
>         EXPRESSION ([CODE] = 310)
>         STYLE
>            COLOR 255 0 0
>         END
>     END
>
>
>>
>>
>>2)  Completely unrelated to the first question: how does mapserver
>>handle Database connections (SDE in particular) with regards to
>>scalability?
>
>If you are using MapServer in regular CGI or MapScript mode, a new
>SDE connection is made for each map request.  This can consume SDE
>connections, especially if Apache is hanging on to them for an
>HTTP_WAIT or you have many multiple requests coming in.
>
>The other approach is to use FastCGI in combination with SDE.
>MapServer has FastCGI support thanks to Frank Warmerdam, and SDE
>supports connection/layerinfo pooling through this mechanism.
>FastCGI allows SDE to share connections and layer information so
>that subsequent requests do not require additional connections to
>SDE.
>
>Even with FastCGI, however, I've found that SDE's connection count
>seems to be consumed with multiple subsequent requests because of
>how SDE does its connection accounting.  I've bumped my SDE
>connection limits high enough to not have this problem, but if you
>don't have enough licenses, or enough memory in your SDE server,
>this can be a problem.
>
>HTH
>
>Howard



More information about the mapserver-users mailing list