<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div>Ahlah,</div><div><br></div><div>Mapserver does the following that should take some additional time:</div><div><span><pre style="color: rgb(0, 0, 0); word-wrap: break-word; white-space: pre-wrap;">encode(ST_AsBinary(ST_Force_2D("point"),'NDR'),'hex') as geom</pre></span></div><div>You can execute the whole query in PostgreSQL and notice the increase of time.</div><div><br></div><div>One question: <span><pre style="color: rgb(0, 0, 0); word-wrap: break-word; white-space: pre-wrap;">s.notice_radius FROM (SELECT * FROM roronline.settings LIMIT 1) AS s</pre></span></div></div><div>is equal to 750 ? or is it smaller ?</div><div><br></div><div>It is a good practice to sort the query before apply a limit.</div><div><br></div><div><br></div><div>Cheers,</div><div><br></div><div>https://www.linkedin.com/in/cruizch</div><div><br></div>
        
        </div><div id="ydp1b2f3c13yahoo_quoted_6343721683" class="ydp1b2f3c13yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Tuesday, September 4, 2018, 7:50:39 AM CDT, ahlah <ahti.lahtela@pp.inet.fi> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">I try to show a polygon on map by creating a buffer around point in Postgis<br></div><div dir="ltr">(by ST_Buffer) but Mapserver has a strange performance problem.<br></div><div dir="ltr">If I put hardcoded radius to ST_Buffer query, rendering takes about 10<br></div><div dir="ltr">seconds although query result is empty. If I set the same value to radius by<br></div><div dir="ltr">reading it from another db table, rendering takes only 300ms. Attached logs<br></div><div dir="ltr">clarifies the sequences:  map_slow.log<br></div><div dir="ltr"><<a href="http://osgeo-org.1560.x6.nabble.com/file/t202655/map_slow.log" rel="nofollow" target="_blank">http://osgeo-org.1560.x6.nabble.com/file/t202655/map_slow.log</a>>  , <br></div><div dir="ltr">map_fast.log <<a href="http://osgeo-org.1560.x6.nabble.com/file/t202655/map_fast.log" rel="nofollow" target="_blank">http://osgeo-org.1560.x6.nabble.com/file/t202655/map_fast.log</a>>   <br></div><div dir="ltr">Problem is not in Postgis because both queries takes about 200ms if I run<br></div><div dir="ltr">them on pgAdmin.<br></div><div dir="ltr">Am I doing something wrong or is it a bug or feature in MapServer? I have<br></div><div dir="ltr">tested it in MapServer 5 and MapServer 7 and result is same.<br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">--<br></div><div dir="ltr">Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html" rel="nofollow" target="_blank">http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html</a><br></div><div dir="ltr">_______________________________________________<br></div><div dir="ltr">mapserver-users mailing list<br></div><div dir="ltr"><a href="mailto:mapserver-users@lists.osgeo.org" rel="nofollow" target="_blank">mapserver-users@lists.osgeo.org</a><br></div><div dir="ltr"><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="nofollow" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></div></div>
            </div>
        </div></div></body></html>