[Gdal-dev] OGR VRT performance through ODBC...

John Cole john.cole at uai.com
Sat Mar 17 15:35:11 EDT 2007


Hello,
  I have a OGR VRT layer defined through ODBC to a MsSqlSpatial database:

<OGRVRTDataSource>
    <OGRVRTLayer name='HUDPLS'>
		<SrcDataSource>ODBC:mapserver at HUDPLS</SrcDataSource>
		<SrcSQL>SELECT t.oid, t.casenumber, t.casestepnu, t.the_geom
FROM ST.FilterQuery('properties', 'the_geom', ST.MakeEnvelope(%BBOX%, -1))
AS q
INNER JOIN properties AS t ON q.oid = t.oid
where t.casestepnu='06' and t.inaca=0</SrcSQL>
		<GeometryType>wkbPoint</GeometryType>
		<GeometryField encoding='WKB' field='the_geom'/>
    </OGRVRTLayer>
</OGRVRTDataSource>

This works, but performance is a little disappointing.  MapServer renders
this layer in ~3.5 seconds, while a postgis layer with the same data is
rendered in ~0.35 seconds.  Running the query in SQL Server Management
Studio has all 23 rows returned in 0.00 seconds, so I'm fairly sure that the
issue is not MsSqlSpatial.  There are 260K points in the table, but only 23
are returned in my test query.

Is there anything I can do to configure either the ODBC driver (SQL Native
Driver) or the VRT layer itself to improve performance?

Thanks,

John Cole

PS. Sorry about sending this to the wrong list.

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.12/724 - Release Date: 3/16/2007
12:12 PM
 
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the Gdal-dev mailing list