<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=big5"><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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML 預設格式 字元";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTML
{mso-style-name:"HTML 預設格式 字元";
mso-style-priority:99;
mso-style-link:"HTML 預設格式";
font-family:"Courier New";}
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.Pr-formataoHTMLChar
{mso-style-name:"Pr\00E9-formata\00E7\00E3o HTML Char";
mso-style-priority:99;
mso-style-link:"Pr\00E9-formata\00E7\00E3o HTML";
font-family:Consolas;
mso-fareast-language:PT-BR;}
p.Pr-formataoHTML, li.Pr-formataoHTML, div.Pr-formataoHTML
{mso-style-name:"Pr\00E9-formata\00E7\00E3o HTML";
mso-style-link:"Pr\00E9-formata\00E7\00E3o HTML Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
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="#0563C1" vlink="#954F72"><div class=WordSection1><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'>Hi,<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'> <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,<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,<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,<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.<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.<o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'><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<o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'><o:p> </o:p></span></pre><p class=MsoNormal style='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'>(<o:p></o:p></span></p><p class=MsoNormal style='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'>,<o:p></o:p></span></p><p class=MsoNormal style='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,<o:p></o:p></span></p><p class=MsoNormal style='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'>(),<o:p></o:p></span></p><p class=MsoNormal style='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<o:p></o:p></span></p><p class=MsoNormal style='line-height:19.5pt;background:#272822'><span lang=EN-US style='font-size:14.5pt;font-family:Consolas;color:#F8F8F2'>);<o:p></o:p></span></p><pre><span lang=EN-US style='font-size:10.5pt;font-family:Courier;color:black'><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">https://trac.osgeo.org/fdo/browser/trunk/Providers/GenericRdbms/Src/SQLServerSpatial/SchemaMgr/Ph/Owner.cpp#L414</a><o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'><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<o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'><o:p> </o:p></span></pre><p class=MsoNormal style='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'>(<o:p></o:p></span></p><p class=MsoNormal style='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'>());<o:p></o:p></span></p><pre><span lang=EN-US style='font-size:10.5pt;font-family:Courier;color:black'><o:p> </o:p></span></pre><p class=MsoNormal><span lang=EN-US><o:p> </o:p></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">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'><o:p> </o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'><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<o:p></o:p></span></pre><pre><span lang=PT-BR style='font-size:10.5pt;font-family:Courier;color:black'><o:p> </o:p></span></pre></div></body></html>