<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
{font-family:新細明體;
panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
{font-family:細明體;
panose-1:2 2 5 9 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@新細明體";
panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@細明體";
panose-1:2 1 6 9 0 1 1 1 1 1;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"新細明體",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML 預設格式 字元";
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:細明體;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"新細明體",serif;}
span.HTML
{mso-style-name:"HTML 預設格式 字元";
mso-style-priority:99;
mso-style-link:"HTML 預設格式";
font-family:"Courier New";}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-TW link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:black;background:white'>thanks for open active ticket</span><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;background:white'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;background:white'><a href="https://trac.osgeo.org/fdo/ticket/996">https://trac.osgeo.org/fdo/ticket/996</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:black;background:white'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:black;background:white'>I found mysql is fix by Jan 7, 2020<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri",sans-serif;color:#1F497D'><a href="https://trac.osgeo.org/fdo/ticket/893#comment:5">https://trac.osgeo.org/fdo/ticket/893#comment:5</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:black;background:white'><a href="https://trac.osgeo.org/fdo/attachment/ticket/893/LimitOneSrid.patch">https://trac.osgeo.org/fdo/attachment/ticket/893/LimitOneSrid.patch</a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;background:white'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;background:white'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> mapguide-users [mailto:mapguide-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Gordon Luckett<br><b>Sent:</b> Wednesday, September 8, 2021 10:41 PM<br><b>To:</b> MapGuide Users Mail List <mapguide-users@lists.osgeo.org><br><b>Subject:</b> Re: [mapguide-users] sqlserver view is no limit row search STSrid ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-US>All Products that use FDO for SQL Server have this problem. It was never fixed in the FDO library.<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><div><p class=MsoNormal><span lang=EN-US>On Wed, Sep 8, 2021 at 8:49 AM </span>周宜和<span lang=EN-US> <<a href="mailto:jyh@mail.gaias.com.tw">jyh@mail.gaias.com.tw</a>> wrote:<o:p></o:p></span></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'>Hi,</span><span lang=EN-US><o:p></o:p></span></pre><pre style='white-space:pre-wrap'><span lang=EN-US style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></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,</span><span lang=EN-US><o:p></o:p></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,</span><span lang=EN-US><o:p></o:p></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,</span><span lang=EN-US><o:p></o:p></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.</span><span lang=EN-US><o:p></o:p></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.</span><span lang=EN-US><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'>Source code below,or open url</span><span lang=EN-US><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></span></pre><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>FdoStringP sqlStmt </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>=</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> </span><u><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#A6E22E'>FdoStringP</span></u><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>::</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#A6E22E'>Format</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>(</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> isview </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>?</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>L"select [</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#AE81FF'>%ls</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>].STSrid as srid from </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#AE81FF'>%ls</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>.</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#AE81FF'>%ls</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>"</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>:</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>L"select top 1 [</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#AE81FF'>%ls</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>].STSrid as srid from </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#AE81FF'>%ls</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>.</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#AE81FF'>%ls</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>"</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>,</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> (FdoString</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>*</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>) columnName,</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> (FdoString</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>*</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>) </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#FD971F'>this</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>-></span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#A6E22E'>GetDbName</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>(),</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> (FdoString</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>*</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>) fmtObjectName</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>);</span><span lang=EN-US><o:p></o:p></span></p><pre><span lang=EN-US style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></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></span><span lang=EN-US><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></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</span><span lang=EN-US><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></span></pre><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>FdoStringP sqlStmt </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>=</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'> </span><u><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#A6E22E'>FdoStringP</span></u><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>::</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#A6E22E'>Format</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>(</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-indent:24.0pt;line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>L"select ST_SRID(</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#AE81FF'>%ls</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'>) as srid from </span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#AE81FF'>%ls</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#E6DB74'> limit 1"</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>, (FdoString</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>*</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>)</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#FD971F'>this</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>-></span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#A6E22E'>GetDbName</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>(), (FdoString</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F92672'>*</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>)dbObject-></span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#A6E22E'>GetDbName</span><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>());</span><span lang=EN-US><o:p></o:p></span></p><pre><span lang=EN-US style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></span></pre><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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><o:p></o:p></span></p><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'>sorry for my bad engilsh</span><span lang=EN-US><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'> </span><span lang=EN-US><o:p></o:p></span></pre></div></div><p class=MsoNormal><span lang=EN-US>_______________________________________________<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" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapguide-users</a><o:p></o:p></span></p></blockquote></div></div></body></html>