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> &gt; 153.45 AND &lt;= 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

Reply via email to