You are right, it doesn't get point per point from the database. It seems to be
getting POLYGONs not POINTs looking at the SQL log.
2011-02-15T09:30:35.622919+00:00 INFO [15-1] 2011-02-15 09:30:35 UTC 5782
10.120.1.121 LOG: execute S_2/C_3: SELECT
"gid","id","cloud",encode(asBinary(force_2d("particle"),'XDR')
,'base64') as "particle" FROM "public"."result" WHERE "particle" &&
GeomFromText('POLYGON ((19.51800683593744 59.022443586917, 19.51800683593744
59.56865646210653, 21.170993164061592 59.56865646210653, 21.17
0993164061592 59.022443586917, 19.51800683593744 59.022443586917))', 4326)
(This select comes not just once but about 100 times in log)
Does that mean its trying to load every geometry in the table into memory so it
can filter in a second step?
Here is the filter part of my sld:
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>id</ogc:PropertyName>
<ogc:Function name="env">
<ogc:Literal>id</ogc:Literal>
</ogc:Function>
</ogc:PropertyIsEqualTo>
and my table with id column:
Table "public.result"
Column | Type | Modifiers
----------+----------+------------------------------------------------------
gid | integer | not null default nextval('result_gid_seq'::regclass)
id | bigint |
cloud | bigint |
particle | geometry |
And my example url call to geoserver (notice the env=ID):
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=Result:result&env=ID:1454503650&styles=&bbox=2173624.3772294596,8149525.176688439,2355854.383658048,8266614.29001515&width=513&height=330&srs=EPSG:3785&format=application/openlayers
This url call takes about 5-20 seconds now with the table filled with different
point, but if I empty the table and only store the points for a particular id,
it goes fast as half a second (which is the performance I want).
Is there any way that I can stop the geoserver from reading all geometrys from
its postgis table by using a parameter like the id I am trying to do?
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users