[mapserver-users] MS SQL server - OGR 5 times slower compared to Mapserver plugin?

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Apr 6 04:39:13 PDT 2016


Hi,

Is it so that spatial index in MSSQL must be activated by a hint?
From http://osgeo-org.1560.x6.nabble.com/Spatial-Index-not-being-Used-in-SQL-Server-Layer-td5011400.html which is an old post. Tere is nowadays a control in Geoserver for configuring that hint.

SELECT myID ,GEOM.STAsBinary() as GEOM
FROM dbo.Current_MGRS_SRID_3857 WITH(INDEX=IDX_GEOM)

WHERE GEOM.STIntersects(geometry::STGeomFromText('POLYGON ((16824688.06064964 -4008988.3687579953, 16824688.06064964 -4007727.157791289, 16825949.27161635 -4007727.157791289, 16825949.27161635 -4008988.3687579953, 16824688.06064964 -4008988.3687579953))', 3857)) = 1

I don't know but wondering that perhaps you can include the WITH(INDEX= into the DATA of your layer and make OGR to utilize index that way.

-Jukka Rahkonen-

Martin Icking wrote:

> We noticed that typical WMS response times using the OGR layer type for MS SQL server are 5 times slower  compared to the MapServer MS SQL plugin.
Maybe the OGR driver does not properly use the spatial index and always let's MapServer filter the relevant geometries? Do other users have a similar experience?
At least that would make the OGR layer type unusable for us in this case. We understand that OGR layers have an extra level of abstraction but that should not create such a big performance penalty. Any hints to make the OGR layer faster?

The reason that we switched from Plugin to OGR was that the Plugin does not properly support the "gml_types" "auto" clause and always reports the column types as string.
Tx
Martin



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MS-SQL-server-OGR-5-times-slower-compared-to-Mapserver-plugin-tp5259922.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list