doc-exports/docs/das/umn/das_05_0100.html
Wang , Deng Ke 0f41701050 DAS UMN Initial version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-10-18 12:51:00 +00:00

16 lines
4.0 KiB
HTML

<a name="das_05_0100"></a><a name="das_05_0100"></a>
<h1 class="topictitle1">SQL Diagnosis</h1>
<div id="body0000001123039532"><div class="section" id="das_05_0100__section270110297283"><h4 class="sectiontitle">Procedure</h4><ol id="das_05_0100__ol1314114919495"><li id="das_05_0100__li85211981017"><span>Log in to the DAS console using your username and password.</span></li><li id="das_05_0100__li2145113319114"><span>On the <strong id="das_05_0100__b1292664685013">Overview</strong> page, click <strong id="das_05_0100__b4927104655011">Go to Intelligent O&amp;M</strong>.</span></li><li id="das_05_0100__li2566183817210"><span>Select the required instance and click <strong id="das_05_0100__b14636114895011">Details</strong> to go to the Intelligent O&amp;M overview page.</span></li><li id="das_05_0100__li581367183111"><span>Choose <strong id="das_05_0100__b17874185005016">SQL</strong> &gt; <strong id="das_05_0100__b78741350195012">SQL Diagnosis</strong>. On the displayed page, select the required database, enter the SQL statements to be diagnosed, and click <strong id="das_05_0100__b1793355535011">Diagnose</strong>. The diagnosis result page is displayed.</span></li><li id="das_05_0100__li138551321515"><span>On the <strong id="das_05_0100__b1563652145912">SQL Diagnosis</strong> page, enter SQL statements and click <span class="uicontrol" id="das_05_0100__uicontrol975816309527"><b>Execute</b></span>. The system automatically executes the statements and displays a result set.</span></li><li id="das_05_0100__li187234371539"><span>On the <strong id="das_05_0100__b1144681715587">SQL Diagnosis</strong> page, enter multiple SQL statements and click <span class="uicontrol" id="das_05_0100__uicontrol444681775810"><b>Format</b></span>. The system automatically formats all SQL statements.</span></li><li id="das_05_0100__li194134417546"><span>On the <strong id="das_05_0100__b18276175075818">SQL Diagnosis</strong> page, enter multiple SQL statements and click <span class="uicontrol" id="das_05_0100__uicontrol827775085812"><b>View Execution Plan</b></span>. The system automatically executes all SQL statements in sequence.</span><p><div class="note" id="das_05_0100__note12509194118211"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="das_05_0100__ul1250974118216"><li id="das_05_0100__li1750911412219">Only MySQL InnoDB is supported.</li><li id="das_05_0100__li7509204119213">Only the diagnosis of SELECT, INSERT, UPDATE, and DELETE statements is supported. An INSERT statement must contain a SELECT clause.</li><li id="das_05_0100__li550994119214">SQL statements for querying system databases information_schema, test, and mysql are not supported.</li><li id="das_05_0100__li19509041929">SQL statements that use views are not supported.</li><li id="das_05_0100__li14803142143520">The SQL diagnosis function obtains the table structure and data distribution information (non-original). The obtained data is only for logic diagnosis, but not stored on the DAS server.</li><li id="das_05_0100__li126373133519">Obtaining table structure and data distribution information may add additional loads to the DB instance, but has little impact on its performance.</li><li id="das_05_0100__li10149193553512">Only the SQL diagnosis history is stored on the DAS server. You can delete it from the server permanently.</li><li id="das_05_0100__li11462123151415">SQL formatting improves the readability of SQL statements. Formatting SQL statements enables statements to be displayed in line break mode, but does not change their logic and semantics.<p id="das_05_0100__p9241133211126"><a name="das_05_0100__li11462123151415"></a><a name="li11462123151415"></a>The formatting takes effect for all the SQL statements in the SQL window. You cannot format only the selected statement.</p>
</li></ul>
</div></div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="das_05_0028.html">SQL</a></div>
</div>
</div>