<div dir="ltr">Steve,<div><br></div><div style>That's a good suggestion.  I'm running a very simple test where I use shp2img with a straightforward map file but if I used ogr2ogr that would take Mapserver out of the equation altogether.  I'll try and set up such a test and see what happens.</div>
<div style><br></div><div style>Cheers,</div><div style><br></div><div style>-Andy</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 2:06 PM, Lime, Steve D (MNIT) [via OSGeo.org] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=5045913&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">

        Is there a way to test your theory independent of MapServer using OGR only? I don't know the MapServer OGR driver well but I can't imagine this is normal.
<br><br>Steve
<br><br>-----Original Message-----
<br></div><div class="im">From: <a href="http://user/SendEmail.jtp?type=node&node=5045879&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a> [mailto:<a href="http://user/SendEmail.jtp?type=node&node=5045879&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>] On Behalf Of deuce2367
<br>Sent: Tuesday, April 09, 2013 9:20 AM
<br></div><div class="im">To: <a href="http://user/SendEmail.jtp?type=node&node=5045879&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>Subject: [mapserver-dev] OGR/MySQL Layer executes SQL query twice
<br><br>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. 
<br>Incidentally it's also performing 2 describes and 2 'select from geometry_columns...' as well.
<br><br>Is this normal and expected? 
<br><br>I apologize if this is a repeat, I didn't find any references to this observation in my searches.  Appreciate any help,
<br><br>-Andy Smith
<br><br><br><br><br>--
<br>View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/OGR-MySQL-Layer-executes-SQL-query-twice-tp5045536.html" rel="nofollow" link="external" target="_blank">http://osgeo-org.1560.x6.nabble.com/OGR-MySQL-Layer-executes-SQL-query-twice-tp5045536.html</a><br>
Sent from the Mapserver - Dev mailing list archive at Nabble.com.
<br>_______________________________________________
<br>mapserver-dev mailing list
<br></div><a href="http://user/SendEmail.jtp?type=node&node=5045879&i=3" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br><br><br>_______________________________________________
<br>mapserver-dev mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=5045879&i=4" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://osgeo-org.1560.x6.nabble.com/OGR-MySQL-Layer-executes-SQL-query-twice-tp5045536p5045879.html" target="_blank" rel="nofollow" link="external">http://osgeo-org.1560.x6.nabble.com/OGR-MySQL-Layer-executes-SQL-query-twice-tp5045536p5045879.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from OGR/MySQL Layer executes SQL query twice, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>

                <a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></blockquote></div><br></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/OGR-MySQL-Layer-executes-SQL-query-twice-tp5045536p5045913.html">Re: OGR/MySQL Layer executes SQL query twice</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/Mapserver-Dev-f4252683.html">Mapserver - Dev mailing list archive</a> at Nabble.com.<br/>