SDE, connection pooling
Hallgren Johan E
jhhal at WMDATA.COM
Mon May 7 05:18:50 EDT 2007
Hello
I have some performance problems that are difficult to manage.
I use SDE and mapscript.
As we know, creating a connection to a database is a time consuming
process. I also expected that if I have a running process, the
connection could be alive as, long as the process is running (by using
the connection pooling). Now I have found that this is not the case. In
the principle code below (even if I have a running process) the SDE
connection will be created two times.
mapObj mapObj = new
mapObj(@"C:\Project\applications\GMS\GMSAgent\MapFiles\svea.map");
layerObj oLayerObj = mapObj.getLayerByName("GISS_FAST");
oLayerObj.queryByAttributes(mapObj, strFld, "(OBJECTID = 19344)",
mapscript.MS_MULTIPLE); ## msSDELayerOpen and msSDECloseConnection ##
oLayerObj.open(); ## msSDELayerOpen ##
resultCacheMemberObj oResultCacheMemberObj =
oResultCacheObj.getResult(lFeat);
shapeObj oShapeObj =
oLayerObj.getFeature(oResultCacheMemberObj.shapeindex,
oResultCacheMemberObj.tileindex);
oLayerObj.close();##msSDECloseConnection ##
I expect that open a connection can take a second or more, but
retreaving records could only take 1/10 of a second or less (depends on
number of records).
Is there any plans to inprove this?
/Johan
___________________________________
Johan Hallgren
WM-data a LogicaCMG company
Pelle Bergs backe 3
Box 1938, 791 19 Falun
Tel: 023-547 46 (int: +46-2354746)
Mobil: 070-588 44 28 (int: +46-705884428)
johan.e.hallgren at wmdata.com
<BLOCKED::mailto:johan.e.hallgren at wmdata.com>
http://www.wmdata.se
<BLOCKED::/exchweb/bin/redir.asp?URL=http://www.wmdata.se/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20070507/68164cc7/attachment.html
More information about the mapserver-dev
mailing list