Hi, 
 
I have a map that runs slow. I am trying to find out the problem.
 
 
Environment: GeoServer version is 2.2.3, SQL Server 2008, Tomcat 6.0, JDK 6.
 
 
The map has one layer using SQL view. The query runs very fast in SQL server 
2008 console (less than a second), but it takes about a minute to load the map 
on web page.
 
 
As below is the log using GeoTools_Developer_Logging. 
 
 
I see that it took about 10 second from getting service info to write out JPEG 
image. 
 
It seems it took very long to write out the image which can’t be captured in 
the log.
 
 
How to speed up running the query from GeoServer? I set up spatial index in the 
database tale. How can I tell if spatial index is being used in GeoServer?
 
How to speed up writing out the image?
 
 
Thanks!
Meichun
 
 
Log details:
 
2013-02-22 12:14:10,101 INFO [org.geoserver.wms] - 
Request: getServiceInfo
2013-02-22 12:14:10,101 DEBUG [org.geotools.styling] - number of fts set 1
2013-02-22 12:14:10,101 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
2013-02-22 12:14:10,116 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
2013-02-22 12:14:10,116 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
2013-02-22 12:14:10,132 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
2013-02-22 12:14:10,132 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
2013-02-22 12:14:10,132 DEBUG [org.geotools.jdbc] - Gathering sql view result 
structure: select * from (Select * from fnEdCountByZip_GIS_Test
(
''
,''
,''
,''
,''
,''
 )) as "vtable" where 1 = 0
2013-02-22 12:14:10,132 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
2013-02-22 12:14:10,132 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
2013-02-22 12:14:10,148 DEBUG [org.geotools.jdbc] - Gathering sql view result 
structure: select * from (Select * from fnEdCountByZip_GIS_Test
(
''
,''
,''
,''
,''
,''
 )) as "vtable" where 1 = 0
2013-02-22 12:14:10,148 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
2013-02-22 12:14:10,148 DEBUG [org.geotools.rendering] - Computed scale 
denominator: 3441158.722425866
2013-02-22 12:14:10,148 DEBUG [org.geotools.rendering] - Processing 1 stylers 
for http://www.ncdetect.org/gis/test:EDSyndromeCountByZip
2013-02-22 12:14:10,148 DEBUG [org.geotools.rendering] - creating rules for 
scale denominator - 3,441,158.722
2013-02-22 12:14:10,148 DEBUG [org.geotools.styling] - creating defaultMark
2013-02-22 12:14:10,148 DEBUG [org.geotools.styling] - creating defaultMark
2013-02-22 12:14:10,148 TRACE [org.geotools.styling] - ENTRY
2013-02-22 12:14:10,148 DEBUG [org.geotools.styling] - creating defaultMark
2013-02-22 12:14:10,148 DEBUG [org.geotools.rendering] - Expanding rendering 
area by 11 pixels to consider stroke width
2013-02-22 12:14:10,148 DEBUG [org.geotools.rendering] - Querying layer 
http://www.ncdetect.org/gis/test:EDSyndromeCountByZip with bbox: 
ReferencedEnvelope[-84.59019013308644 : -75.19033089137956, 33.6907547413986 : 
36.7374862819874]
2013-02-22 12:14:10,148 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
2013-02-22 12:14:10,148 TRACE [org.geotools.core] - ENTRY 4
2013-02-22 12:14:10,148 DEBUG [org.geotools.filter] - exporting PropertyName
2013-02-22 12:14:10,148 DEBUG [org.geotools.filter] - exporting 
LiteralExpression
2013-02-22 12:14:10,148 DEBUG [org.geotools.jdbc] - SELECT 
"ID","Count","GEOM".STAsBinary() as "GEOM" FROM (Select * from 
fnEdCountByZip_GIS_Test
(
'02/12/2013'
,'02/21/2013'
,'3'
,'1 2 3 4 5 6 7 8 9 10'
,''
,'county'
 )) as "vtable" WHERE  "GEOM".Filter(geometry::STGeomFromText('POLYGON 
((-84.59019013308644 33.6907547413986, -84.59019013308644 36.7374862819874, 
-75.19033089137956 36.7374862819874, -75.19033089137956 33.6907547413986, 
-84.59019013308644 33.6907547413986))', 4326)) = 1
2013-02-22 12:14:21,156 DEBUG [org.geotools.rendering] - trying to render 
symbol circle
2013-02-22 12:14:21,156 DEBUG [org.geotools.rendering] - rendering mark @ 
PointRenderer circle
2013-02-22 12:14:21,156 DEBUG [org.geotools.rendering] - fetching mark of name 
circle
2013-02-22 12:14:21,156 DEBUG [org.geotools.rendering] - returning circle
2013-02-22 12:14:21,156 DEBUG [org.geotools.rendering] - creating text style
2013-02-22 12:14:21,156 DEBUG [org.geotools.rendering] - geomName = null
2013-02-22 12:14:21,156 DEBUG [org.geotools.rendering] - label is 3
2013-02-22 12:14:21,156 DEBUG [org.geotools.rendering] - setting pointPlacement
2013-02-22 12:14:21,172 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
2013-02-22 12:14:21,187 DEBUG [org.geotools.rendering] - Style cache hit ratio: 
0.9953051643192489 , hits 212, requests 213
2013-02-22 12:14:21,187 INFO [org.geoserver.wms] - 
Request: getMap
 Time = []
 Filter = null
 Format = image/jpeg
 Buffer = 0
 Height = 330
 Width = 1064
 Tiled = false
 Palette = null
 SRS = EPSG:4326
 FeatureVersion = null
 Legend = false
 Styles = [StyleImpl[ name=circle_syndrome_count]]
 Layers = [org.geoserver.wms.MapLayerInfo@aaa8ddb5]
 MaxFeatures = null
 Bbox = ReferencedEnvelope[-84.494979772443 : -75.285541252023, 33.785965102042 
: 36.642275921344]
 RemoteOwsType = null
 RemoteOwsURL = null
 Env = {}
 FormatOptions = {}
 Angle = 0.0
 CQLFilter = null
 Elevation = []
 FeatureId = null
 StartIndex = null
 ViewParams = [{EDATE=02/21/2013, LOCATIONID=, AGEGROUPID=1 2 3 4 5 6 7 8 9 10, 
BDATE=02/12/2013, SYNDROMEID=3, LOCATIONTYPE=county}]
 Crs = GEOGCS["WGS 84", 
  DATUM["World Geodetic System 1984", 
    SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], 
    AUTHORITY["EPSG","6326"]], 
  PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
  UNIT["degree", 0.017453292519943295], 
  AXIS["Geodetic longitude", EAST], 
  AXIS["Geodetic latitude", NORTH], 
  AUTHORITY["EPSG","4326"]]
 BgColor = java.awt.Color[r=255,g=255,b=255]
 Transparent = false
 SldBody = null
 ValidateSchema = false
 Sld = null
 SldVersion = null
 TilesOrigin = null
 Filters = null
 Exceptions = SE_XML
 KMScore = 40
 KMattr = true
 Version = 1.1.1
 Request = GetMap
 Get = true
 RawKvp = 
{BBOX=-84.494979772443,33.785965102042,-75.285541252023,36.642275921344, 
VERSION=1.1.1, FORMAT=image/jpeg, SERVICE=WMS, 
VIEWPARAMS=LocationType:county;LocationID:;EDate:02/21/2013;AgegroupID:1 2 3 4 
5 6 7 8 9 10;SyndromeID:3;BDate:02/12/2013, HEIGHT=330, REQUEST=GetMap, 
LAYERS=ncdetect_test:EDCountByZip, STYLES=, WIDTH=1064, SRS=EPSG:4326}
 BaseUrl = http://localhost:8080/geoserver/
 RequestCharset = UTF-8
2013-02-22 12:14:21,187 DEBUG [org.geotools.image] - Encoding input image to 
write out as JPEG.
2013-02-22 12:14:21,187 DEBUG [org.geotools.image] - Getting a JPEG writer and 
configuring it.
2013-02-22 12:14:21,187 DEBUG [org.geotools.image] - Writing out...
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to