<div dir="ltr">All Products that use FDO for SQL Server have this problem.  It was never fixed in the FDO library.<div><br></div><div>MapGuide, Infraworks, AutoCAD Map etc all use the FDO provider and this runs a full select on every table and view just to get the STSrid for each one.<div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 8, 2021 at 8:49 AM 周宜和 <<a href="mailto:jyh@mail.gaias.com.tw">jyh@mail.gaias.com.tw</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="ZH-TW"><div class="gmail-m_-4174696657930848281WordSection1"><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">Hi,<u></u><u></u></span></pre><pre style="white-space:pre-wrap"><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"> <u></u><u></u></span></pre><pre style="white-space:pre-wrap"><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">I got cpu busy with sqlserver,<u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">My Web Server is mapguide 3.1.2,<u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">Target layer is 15 thousand address point of view,<u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">Then i find source code when table select top 1,but view is no limit row search STSrid.<u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">when layer preview from view , effect sqlserver cpu high loading.<u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">Source code below,or open url<u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre><p class="MsoNormal" style="line-height:19.5pt;background:rgb(39,40,34)"><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">FdoStringP sqlStmt </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">=</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)"> </span><u><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(166,226,46)">FdoStringP</span></u><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">::</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(166,226,46)">Format</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">(<u></u><u></u></span></p><p class="MsoNormal" style="line-height:19.5pt;background:rgb(39,40,34)"><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">    isview </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">?</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)"> </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">L"select [</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(174,129,255)">%ls</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">].STSrid as srid from </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(174,129,255)">%ls</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">.</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(174,129,255)">%ls</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">"</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)"> </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">:</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)"> </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">L"select top 1 [</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(174,129,255)">%ls</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">].STSrid as srid from </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(174,129,255)">%ls</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">.</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(174,129,255)">%ls</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">"</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">,<u></u><u></u></span></p><p class="MsoNormal" style="line-height:19.5pt;background:rgb(39,40,34)"><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">    (FdoString</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">*</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">) columnName,<u></u><u></u></span></p><p class="MsoNormal" style="line-height:19.5pt;background:rgb(39,40,34)"><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">    (FdoString</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">*</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">) </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(253,151,31)">this</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">-></span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(166,226,46)">GetDbName</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">(),<u></u><u></u></span></p><p class="MsoNormal" style="line-height:19.5pt;background:rgb(39,40,34)"><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">    (FdoString</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">*</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">) fmtObjectName<u></u><u></u></span></p><p class="MsoNormal" style="line-height:19.5pt;background:rgb(39,40,34)"><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">);<u></u><u></u></span></p><pre><span lang="EN-US" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"><a href="https://trac.osgeo.org/fdo/browser/trunk/Providers/GenericRdbms/Src/SQLServerSpatial/SchemaMgr/Ph/Owner.cpp#L414" target="_blank">https://trac.osgeo.org/fdo/browser/trunk/Providers/GenericRdbms/Src/SQLServerSpatial/SchemaMgr/Ph/Owner.cpp#L414</a><u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">and mysql has limit 1 for search STSrid<u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre><p class="MsoNormal" style="line-height:19.5pt;background:rgb(39,40,34)"><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">FdoStringP sqlStmt </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">=</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)"> </span><u><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(166,226,46)">FdoStringP</span></u><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">::</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(166,226,46)">Format</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">(<u></u><u></u></span></p><p class="MsoNormal" style="text-indent:24pt;line-height:19.5pt;background:rgb(39,40,34)"><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">L"select ST_SRID(</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(174,129,255)">%ls</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)">) as srid from </span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(174,129,255)">%ls</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(230,219,116)"> limit 1"</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">, (FdoString</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">*</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">)</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(253,151,31)">this</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">-></span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(166,226,46)">GetDbName</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">(), (FdoString</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(249,38,114)">*</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">)dbObject-></span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(166,226,46)">GetDbName</span><span lang="EN-US" style="font-size:14.5pt;font-family:Consolas;color:rgb(248,248,242)">());<u></u><u></u></span></p><pre><span lang="EN-US" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><a href="https://trac.osgeo.org/fdo/browser/trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/ColumnGeom.cpp#L29" target="_blank">https://trac.osgeo.org/fdo/browser/trunk/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/ColumnGeom.cpp#L29</a><u></u><u></u></span></p><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black">sorry for my bad engilsh<u></u><u></u></span></pre><pre><span lang="PT-BR" style="font-size:10.5pt;font-family:Courier;color:black"><u></u> <u></u></span></pre></div></div>_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapguide-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</blockquote></div>