[mapserver-dev] OGR/MySQL Layer executes SQL query twice

deuce2367 apsmith2367 at gmail.com
Tue Apr 9 07:20:08 PDT 2013

I'm using Mapserver 6.0.2 and GDAL 1.7.2 and have created a mapfile with an
OGR/MySQL layer.  The SQL query that retrieves the spatial data is fairly
slow, takes about 8-10 seconds.  I've noticed that whenever I render the
layer (via the mapserv binary or via the shp2img utility) that the query
executes two times.  I thought this was maybe some sort of
introspection/reflection issue where perhaps OGR is trying to characterize
the data somehow so I made sure to create and populate the geometry_columns
table but that doesn't seem to help, it's still running the SQL query twice. 
Incidentally it's also performing 2 describes and 2 'select from
geometry_columns...' as well.

Is this normal and expected? 

I apologize if this is a repeat, I didn't find any references to this
observation in my searches.  Appreciate any help,

-Andy Smith

View this message in context: http://osgeo-org.1560.x6.nabble.com/OGR-MySQL-Layer-executes-SQL-query-twice-tp5045536.html
Sent from the Mapserver - Dev mailing list archive at Nabble.com.

More information about the mapserver-dev mailing list