Thanks Andrea for the answer, I'm not sure if i fully understood what you mean, i'm not running any specific query, i'm using just the REST calls, i don't know if there is any specific data store configuration. Can u let me know how can i check this?
I just noted that there is a lot of postgres activities before the layer is rendered and also the default polygon style takes a while to render the layer. here is the URL with the default polygon SLD (it takes a long time): http://fenix.fao.org:8050/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=fenix:prj_445744375&styles=polygon&bbox=-180.0,-55.9794960021973,180.0,83.1106185913086&width=854&height=330&srs=EPSG:4326&format=application/openlayers here is the URL that uses the SLD with the classes (it takes a long time): http://fenix.fao.org:8050/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=fenix:prj_445744375&styles=&bbox=-180.0,-55.9794960021973,180.0,83.1106185913086&width=854&height=330&srs=EPSG:4326&format=application/openlayers and also using the World layer (that contains more polygons), the rendering is much faster: http://fenix.fao.org:8050/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=fenix:zzlayer_gaul0&styles=polygon&bbox=-180.0,-89.9,180.0,83.627&width=684&height=330&srs=EPSG:4326&format=application/openlayers Do you have any idea? :) Thanks again, Simone ________________________________________ Da: [email protected] [[email protected]] per conto di Andrea Aime [[email protected]] Inviato: lunedì 18 aprile 2011 10.22 A: Murzilli, Simone (ESA) Cc: [email protected] Oggetto: Re: [Geoserver-users] SLD class creation issue On Mon, Apr 18, 2011 at 10:00 AM, Murzilli, Simone (ESA) <[email protected]> wrote: > Hi to all, > > I'm quite new to GeoServer (currently using the 2.1 RC3 version), i have a > few questions about SLDs. > > I'm styling a vector layer that has many polygons on which i project data > which covers a numeric range. When the data range is really large (i.e. from > 1-9Bil) the time it takes to render the layer is really long and i can see a > lot of postgres processes running. Conversley, when the data range is small > (i.e 1-100) the rendering is very fast. > > Also the number of classes generated (6) is equal regardless of the data > range. > > Is there a way of optimizing the SLDs classes creation when the data range is > large? The SLD is generated using the GeoServer SLD Service which uses the > following rule: > > <sld:Rule> > <sld:Title> > 153.45 AND <= 291.42</sld:Title> > <ogc:Filter> > <ogc:PropertyIsLessThanOrEqualTo> > <ogc:Literal>291.42</ogc:Literal> > <ogc:PropertyName>quantity</ogc:PropertyName> > </ogc:PropertyIsLessThanOrEqualTo> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Fill> > <sld:CssParameter name="fill">#E6AA91</sld:CssParameter> > </sld:Fill> > </sld:PolygonSymbolizer> > </sld:Rule> > > > Maybe i'm missing something quite obvious, any help would be most appreciated I'd check if the data store configuration uses prepared statements. If so, please go and disable them. Prepared statements offer better security against sql injection and some performance improvement if the queries made are all "similar", but if you mix very selective queries with ones that are not the database is probably going to make a wrong choice of access plan. In your case it probably decided to use an index based on the interval filter, but if the interval is very large, not selective at all, that choice is going to be very poor 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 mob: +39 333 8128928 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 ------------------------------------------------------- ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
