On Thu, Nov 10, 2011 at 1:29 PM, Erlandsson Anders <
anders.erlands...@sundsvall.se> wrote:
> Hi
> I've got performance issues when filtering on two different properties
> in my SLD. Filtering using one property works fine.
>
> This filter statement works fine:
> <ogc:Filter>
> <ogc:PropertyIsEqualTo>
> <ogc:PropertyName>OBJ</ogc:PropertyName>
> <ogc:Literal>300</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> </ogc:Filter>
>
> When I add another property to the filter it gets really slow:
> <ogc:Filter>
> <ogc:And>
> <ogc:PropertyIsEqualTo>
> <ogc:PropertyName>OBJ</ogc:PropertyName>
> <ogc:Literal>300</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> <ogc:PropertyIsEqualTo>
> <ogc:PropertyName>TYP</ogc:PropertyName>
> <ogc:Literal>3000</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> </ogc:And>
> </ogc:Filter>
>
> My data is stored in Oracle 11.2. I have rebuilt the indexes on the
> columns OBJ and TYP and even my geometry column.
>
> Any good suggestions on why it gets so much slower when adding the
> second property?
>
> Is there a way to put a filter directly on the layer/feature type? I
> don't know how Geoserver manages WFS-requests on a layer, but I hope it
> uses the SLD-filtering. Otherwise it would be really necessary to have a
> filtering option for the layer too.
>
I hope you mean WMS, not WFS. WMS does use the filters you setup
and sends them down the db (assuming the translation engine knows how to
encode them in SQL, which is normally the case unless you use filter
functions
inside the filter).
I'd suggest you to put GeoServer logging in "geotools developer" mode and
see what query goes down into the db, and then have Oracle explain it (that
is, show the access plan).
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users