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

deuce2367 apsmith2367 at gmail.com
Wed Apr 10 10:38:34 PDT 2013


Hi,

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 

p.s.  I posted this to the mapserver forum but realized this question
pertained more to GDAL/OGR...  



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


More information about the gdal-dev mailing list