首页 / 浏览问题 / 云GIS / 问题详情
postGIS数据源+iServer10i发布的WFS服务太慢
43EXP 2022年06月21日
postGIS数据源+iServer10i发布的WFS服务比geoserver发布的WFS服务慢太多

原生postGIS面数据+GeoServer发布WFS1.0.0服务进行属性查询20ms可以完成,

同样的面数据导入到超图的postGIS数据源中用iserver10i发布WFS服务后同样坐标点的属性查询要花费500ms到2.0s,

效率差距过大,是产品缺陷导致的问题吗?有什么办法提升速度?

下面是iserver发布的wfs服务请求样例

http://localhost:8090/iserver/services/data-vs400/wfs100/utf-8?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.0.0&TYPENAME=vs400:vs400&MAXFEATURES=1&filter=<Filter xmlns:gml="http://www.opengis.net/gml"><Contains><PropertyName>smgeometry</PropertyName><gml:Point srsName="urn:ogc:def:crs:EPSG::4326"><gml:coordinates>139.776649475098,35.7636470226413</gml:coordinates> </gml:Point></Contains></Filter>

<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vs400="http://www.supermap.com/vs400" xmlns="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:8090/iserver/services/data-vs400/wfs100/utf-8?request=getschema&file=wfs,1.0.0,WFS-basic.xsd http://www.supermap.com/vs400 http://localhost:8090/iserver/services/data-vs400/wfs100/utf-8?SERVICE=WFS&REQUEST=DESCRIBEFEATURETYPE&VERSION=1.0.0&TYPENAME=vs400:vs400">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>139.775,35.7625 139.77812500000002,35.764583333333334</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<vs400:vs400 fid="vs400.vs400.3225985">
<vs400:the_geom>
<gml:MultiPolygon srsName="EPSG:4326">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>139.775,35.7625 139.775,35.764583333333334 139.77812500000002,35.764583333333334 139.77812500000002,35.7625 139.775,35.7625</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</vs400:the_geom>
<vs400:jcode>13</vs400:jcode>
<vs400:code>5339561231</vs400:code>
<vs400:avs>135.4</vs400:avs>
<vs400:arv>2.5158</vs400:arv>
<vs400:SmUserID>0</vs400:SmUserID>
<vs400:SmPerimeter>1027.511418124502</vs400:SmPerimeter>
<vs400:SmID>3225985</vs400:SmID>
<vs400:SmGeometry/>
<vs400:SmArea>65324.591548272096</vs400:SmArea>
</vs400:vs400>
</gml:featureMember>
</wfs:FeatureCollection>

下面是geoserver发布的wfs服务请求样例

http://localhost:8080/geoserver/wfs?request=GetFeature&VERSION=1.0.0&typeName=pg:vs400&filter=<Filter xmlns:gml="http://www.opengis.net/gml"><Contains><PropertyName>smgeometry</PropertyName><gml:Point srsName="urn:ogc:def:crs:EPSG::4326"> <gml:coordinates>35.7636470226413,139.776649475098</gml:coordinates> </gml:Point></Contains></Filter>

<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:pg="pg" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://********/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd pg http://*********/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=pg%3Avs400">
<gml:boundedBy>
<gml:null>unknown</gml:null>
</gml:boundedBy>
<gml:featureMember>
<pg:vs400 fid="vs400.2716537">
<pg:code>5339561231</pg:code>
<pg:jcode>13</pg:jcode>
<pg:avs>135.4</pg:avs>
<pg:arv>2.5158</pg:arv>
<pg:geom>
<gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">139.775,35.7625 139.775,35.76458333 139.778125,35.76458333 139.778125,35.7625 139.775,35.7625</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</pg:geom>
</pg:vs400>
</gml:featureMember>
</wfs:FeatureCollection>

1个回答

您好,iserver查询优化可以从以下几个方面入手:

一:iserver与机器不在同一台电脑,连接慢:解决办法:
1、提高网络带宽、降低其他服务的上传下载的流量使用
2、改善网络安全策略,避免因安全策略杀掉iServer与数据库建立的长会话
3、数据库迁移到iServer所在机器
4、协调网络管理员解决网络问题

二:数据处理:
1.根据需要返回需要的属性字段和空间信息,几何要素节点过多可以提前对数据进行优化处理,减少节点。
2.建立字段索引,优化查询速度。

三: iServer服务计算压力大、 服务不稳定:
1、考虑搭建iServer集群或nginx做负载均衡
2、将一部分iServer服务计算通过空间引 l擎函数下沉到数据库层面,数据库做一部分的空间计算, 如叠加裁剪等
3,148EXP 2022年06月21日
...