forked from docs/doc-exports
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
319 lines
30 KiB
HTML
319 lines
30 KiB
HTML
<a name="rds_07_0002"></a><a name="rds_07_0002"></a>
|
|
|
|
<h1 class="topictitle1">Querying Slow Query Log Statistics</h1>
|
|
<div id="body0000002376466176"><div class="section" id="rds_07_0002__en-us_topic_0000001496833745_section61759636"><h4 class="sectiontitle">Function</h4><p id="rds_07_0002__en-us_topic_0000001496833745_p33831530">This API is used to query slow query log statistics of a DB instance.</p>
|
|
<ul id="rds_07_0002__ul86705111838"><li id="rds_07_0002__en-us_topic_0240111818_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_07_0002__en-us_topic_0240111818_li1991981933613">Before calling this API, obtain the required <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">region and endpoint</a>.</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_07_0002__en-us_topic_0000001496833745_section2563029124413"><h4 class="sectiontitle">Constraints</h4><p id="rds_07_0002__en-us_topic_0000001496833745_p121571021134413">This API is available only to RDS for MySQL and RDS for PostgreSQL.</p>
|
|
</div>
|
|
<div class="section" id="rds_07_0002__en-us_topic_0000001496833745_section18965813"><h4 class="sectiontitle">URI</h4><ul id="rds_07_0002__en-us_topic_0000001496833745_ul13194498"><li id="rds_07_0002__en-us_topic_0000001496833745_li41603465301">URI format<p id="rds_07_0002__en-us_topic_0000001496833745_p11160246123012"><a name="rds_07_0002__en-us_topic_0000001496833745_li41603465301"></a><a name="en-us_topic_0000001496833745_li41603465301"></a>POST https://{<em id="rds_07_0002__en-us_topic_0000001496833745_i1288545311165">endpoint</em>}/v3.1/{project_id}/instances/{instance_id}/slow-logs/statistics</p>
|
|
</li></ul>
|
|
<ul id="rds_07_0002__en-us_topic_0000001496833745_ul55999443"><li id="rds_07_0002__en-us_topic_0000001496833745_li21405046">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_07_0002__en-us_topic_0000001496833745_table58427690" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_07_0002__en-us_topic_0000001496833745_row1482002"><th align="left" class="cellrowborder" valign="top" width="21.3%" id="mcps1.3.3.3.1.1.2.4.1.1"><p id="rds_07_0002__en-us_topic_0000001496833745_p52933326"><strong id="rds_07_0002__b562711421051">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.899999999999999%" id="mcps1.3.3.3.1.1.2.4.1.2"><p id="rds_07_0002__en-us_topic_0000001496833745_p59740974"><strong id="rds_07_0002__b143216441358">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.800000000000004%" id="mcps1.3.3.3.1.1.2.4.1.3"><p id="rds_07_0002__en-us_topic_0000001496833745_p7180698"><strong id="rds_07_0002__b1977734514517">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_07_0002__en-us_topic_0000001496833745_row44765691"><td class="cellrowborder" valign="top" width="21.3%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p2142393">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.899999999999999%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p39316155">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.800000000000004%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_07_0002__p1434580163733">Specifies the project ID of a tenant in a region.</p>
|
|
<p id="rds_07_0002__p149071611472">For details about how to obtain the project ID, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row5992637"><td class="cellrowborder" valign="top" width="21.3%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p15641626">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.899999999999999%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p59012183">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.800000000000004%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p15257500">ID of the instance to be queried.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_07_0002__en-us_topic_0000001496833745_section36474591"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_07_0002__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_07_0002__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.4.2.2.5.1.1"><p id="rds_07_0002__p95111733143318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.4.2.2.5.1.2"><p id="rds_07_0002__p13511123373311">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.4.2.2.5.1.3"><p id="rds_07_0002__p125111433133312">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.4.2.2.5.1.4"><p id="rds_07_0002__p551110331335">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_07_0002__row353717218338"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rds_07_0002__p18511533163317">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.2.2.5.1.2 "><p id="rds_07_0002__p13511153333312">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rds_07_0002__p55111833183319">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rds_07_0002__p35111331332">The content type.</p>
|
|
<p id="rds_07_0002__p1351133311330">The default value is <strong id="rds_07_0002__b105111133143310">application/json</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rds_07_0002__p1163015550331">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.2.2.5.1.2 "><p id="rds_07_0002__p1963035563316">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rds_07_0002__p1630105520331">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rds_07_0002__p1086851153317">Specifies the user token.</p>
|
|
<p id="rds_07_0002__p1057635831">The user token is a response to the API used to <a href="https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html" target="_blank" rel="noopener noreferrer">obtain a user token</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_07_0002__en-us_topic_0000001496833745_table1723519271498" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="rds_07_0002__en-us_topic_0000001496833745_row7236162717912"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.4.3.2.5.1.1"><p id="rds_07_0002__en-us_topic_0000001496833745_p1823614271899"><strong id="rds_07_0002__b1870629876">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.4.3.2.5.1.2"><p id="rds_07_0002__en-us_topic_0000001496833745_p11236192711912"><strong id="rds_07_0002__b1050756300">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.01%" id="mcps1.3.4.3.2.5.1.3"><p id="rds_07_0002__en-us_topic_0000001496833745_p1151495102615"><strong id="rds_07_0002__b10134025151115">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.510000000000005%" id="mcps1.3.4.3.2.5.1.4"><p id="rds_07_0002__en-us_topic_0000001496833745_p7236182717915"><strong id="rds_07_0002__b1166328693">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_07_0002__en-us_topic_0000001496833745_row1423615273915"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p4236927698">start_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p6236827799">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1345425420275">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.510000000000005%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_07_0002__en-us_topic_0000001496833745_p7237132710910">Start time in the "yyyy-mm-ddThh:mm:ssZ" format.</p>
|
|
<p id="rds_07_0002__en-us_topic_0000001496833745_p182375271595"><strong id="rds_07_0002__b56568442293">T</strong> is the separator between the calendar and the hourly notation of time. <strong id="rds_07_0002__b7657944192915">Z</strong> indicates the time zone offset.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row172373271597"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p132374272092">end_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p823714270912">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p245425418271">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.510000000000005%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_07_0002__en-us_topic_0000001496833745_p192376278914">End time in the "yyyy-mm-ddThh:mm:ssZ" format.</p>
|
|
<p id="rds_07_0002__en-us_topic_0000001496833745_p142371527296"><strong id="rds_07_0002__b127961949112911">T</strong> is the separator between the calendar and the hourly notation of time. <strong id="rds_07_0002__b1796164942915">Z</strong> indicates the time zone offset. You can only query slow logs generated within a month.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row223742710916"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1723710271792">offset</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p4237427891">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p13454205410276">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.510000000000005%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1623742710919">Index offset. The default value is <strong id="rds_07_0002__b119372131305">0</strong>, indicating that the query starts from the first piece of data.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row16237627991"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p423752714914">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p15237427193">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p12454454122712">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.510000000000005%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_07_0002__en-us_topic_0000001496833745_p9237162715918">Number of records (query results) displayed on each page. The number ranges from 1 to 100. The default value is <strong id="rds_07_0002__b1639921418269">10</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row19237827694"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p142372271996">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1523712275910">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p04543545275">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.510000000000005%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_07_0002__en-us_topic_0000001496833745_p182371627091">Statement type. If this parameter is left empty, all statement types are queried.</p>
|
|
<p id="rds_07_0002__en-us_topic_0000001496833745_p16238142718910">Enumerated values:</p>
|
|
<ul id="rds_07_0002__en-us_topic_0000001496833745_ul20238182715917"><li id="rds_07_0002__en-us_topic_0000001496833745_li182381327897">INSERT</li><li id="rds_07_0002__en-us_topic_0000001496833745_li10238127899">UPDATE</li><li id="rds_07_0002__en-us_topic_0000001496833745_li112381827893">SELECT</li><li id="rds_07_0002__en-us_topic_0000001496833745_li1223814279918">DELETE</li><li id="rds_07_0002__en-us_topic_0000001496833745_li7238182711917">CREATE</li><li id="rds_07_0002__en-us_topic_0000001496833745_li6238162719910">ALL</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row1323817271390"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p132383271098">database</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p62381827194">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p14540548270">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.510000000000005%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1238132715918">Database name. It cannot contain special characters such as < > &.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row11238182714917"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p823812279914">sort</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1623852715915">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p845465410279">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.510000000000005%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_07_0002__en-us_topic_0000001496833745_p92381427596">Sorting field.</p>
|
|
<ul id="rds_07_0002__en-us_topic_0000001496833745_ul17238527892"><li id="rds_07_0002__en-us_topic_0000001496833745_li423812271394"><strong id="rds_07_0002__b156820246314">executeTime</strong>: indicates sorting slow query logs by average execution time in descending order.</li><li id="rds_07_0002__en-us_topic_0000001496833745_li42391827599">If this parameter is left empty or set to other values, the slow query logs are sorted by executions in descending order.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row0239192712919"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p623920271298">order</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p152396271896">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p345465412710">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.510000000000005%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1623912271999">Sorting sequence. The default value is <span class="parmvalue" id="rds_07_0002__parmvalue1477182118320"><b>desc</b></span>.</p>
|
|
<p id="rds_07_0002__en-us_topic_0000001496833745_p72395271390">Enumerated values:</p>
|
|
<ul id="rds_07_0002__en-us_topic_0000001496833745_ul1123918277920"><li id="rds_07_0002__en-us_topic_0000001496833745_li123917271694">desc</li><li id="rds_07_0002__en-us_topic_0000001496833745_li123932712918">asc</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="rds_07_0002__section6955195402520"><h4 class="sectiontitle">Example Request</h4><div class="p" id="rds_07_0002__p133308184273">Query slow query log statistics. Each page contains 10 records.<pre class="screen" id="rds_07_0002__screen1618810477265">POST https://rds.eu-de.otc.t-systems.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/slow-logs/statistics
|
|
{
|
|
"start_time":"2023-01-05T08:00:00+0800",
|
|
"end_time":"2023-01-11T20:00:00+0800",
|
|
"limit":10,
|
|
"order":"asc"
|
|
}</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="rds_07_0002__en-us_topic_0000001496833745_section59835867"><h4 class="sectiontitle">Response</h4><ul id="rds_07_0002__en-us_topic_0000001496833745_ul66273227"><li id="rds_07_0002__en-us_topic_0000001496833745_li59588135">Normal response
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_07_0002__en-us_topic_0000001496833745_table66531170" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameter description</caption><thead align="left"><tr id="rds_07_0002__en-us_topic_0000001496833745_row12984378"><th align="left" class="cellrowborder" valign="top" width="19.220000000000002%" id="mcps1.3.6.2.1.1.2.4.1.1"><p id="rds_07_0002__en-us_topic_0000001496833745_p45101667"><strong id="rds_07_0002__b1105728018">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.01%" id="mcps1.3.6.2.1.1.2.4.1.2"><p id="rds_07_0002__en-us_topic_0000001496833745_p29356372"><strong id="rds_07_0002__b372327046">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="67.77%" id="mcps1.3.6.2.1.1.2.4.1.3"><p id="rds_07_0002__en-us_topic_0000001496833745_p29055926"><strong id="rds_07_0002__b83164261115">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_07_0002__en-us_topic_0000001496833745_row1562610185558"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.1.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p78823520477">slow_log_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.6.2.1.1.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p28299952183823">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.77%" headers="mcps1.3.6.2.1.1.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p144381223194814">Data set</p>
|
|
<p id="rds_07_0002__en-us_topic_0000001496833745_p60622679185558">For details, see <a href="#rds_07_0002__en-us_topic_0000001496833745_table1950773843311">Table 5</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row46227617185624"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.1.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1688103512472">total_count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.01%" headers="mcps1.3.6.2.1.1.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p5721142018265">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.77%" headers="mcps1.3.6.2.1.1.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p66634382185624">Total number of records.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="rds_07_0002__en-us_topic_0000001496833745_table1950773843311"></a><a name="en-us_topic_0000001496833745_table1950773843311"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_07_0002__en-us_topic_0000001496833745_table1950773843311" frame="border" border="1" rules="all"><caption><b>Table 5 </b>slow_log_list field data structure description</caption><thead align="left"><tr id="rds_07_0002__en-us_topic_0000001496833745_row1950719385338"><th align="left" class="cellrowborder" valign="top" width="19.220000000000002%" id="mcps1.3.6.2.1.2.2.4.1.1"><p id="rds_07_0002__en-us_topic_0000001496833745_p165072385333"><strong id="rds_07_0002__b119871401216">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.04%" id="mcps1.3.6.2.1.2.2.4.1.2"><p id="rds_07_0002__en-us_topic_0000001496833745_p175081838173315"><strong id="rds_07_0002__b1015318224">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="67.74%" id="mcps1.3.6.2.1.2.2.4.1.3"><p id="rds_07_0002__en-us_topic_0000001496833745_p1250813820337"><strong id="rds_07_0002__b771357111216">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_07_0002__en-us_topic_0000001496833745_row20508638193311"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p9155191594915">count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p131551715134910">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p81551015104920">Number of executions.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row1750883815335"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p2156101564915">time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p171565154499">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1156151544918">Average execution duration.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row1050853893315"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p71561215174915">lock_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p9156141517499">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p191561615184917">Average waiting time before locking. Only RDS for MySQL supports this parameter.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row13508183819331"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p17156101518498">rows_sent</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p111565156499">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p121561515124919">Average number of rows contained in a result. Only RDS for MySQL supports this parameter.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row26041859185714"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1115671524913">rows_examined</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p10156181512494">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1515631515492">Average number of scanned rows. Only RDS for MySQL supports this parameter.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row8051277185753"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p101562157491">database</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p9156181594916">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p3156111524911">Database which slow logs belong to. If any database name contains special characters such as < > ', the special characters will be escaped.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row62737284185755"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1815731534912">users</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p2157131511499">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p21571415104919">User account.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row24608043185759"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1315719154495">query_sample</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p18157131518492">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1157615174916">Execution syntax.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row2025783011386"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p13157151510495">client_ip</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p9157131584914">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p1215791544913">IP address.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_07_0002__en-us_topic_0000001496833745_row0376204863619"><td class="cellrowborder" valign="top" width="19.220000000000002%" headers="mcps1.3.6.2.1.2.2.4.1.1 "><p id="rds_07_0002__en-us_topic_0000001496833745_p10157181524920">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.04%" headers="mcps1.3.6.2.1.2.2.4.1.2 "><p id="rds_07_0002__en-us_topic_0000001496833745_p215741519499">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.74%" headers="mcps1.3.6.2.1.2.2.4.1.3 "><p id="rds_07_0002__en-us_topic_0000001496833745_p2157161513490">Statement type.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="rds_07_0002__en-us_topic_0000001496833745_ul26818564"><li id="rds_07_0002__en-us_topic_0000001496833745_li40040492">Example normal response<pre class="screen" id="rds_07_0002__screen5382212563">{
|
|
"slow_log_list" : [ {
|
|
"count" : "9 (100.00%)",
|
|
"time" : "3.00018 s",
|
|
"lock_time" : "0.00000 s",
|
|
"rows_sent" : 1,
|
|
"rows_examined" : 0,
|
|
"database" : "test_db",
|
|
"users" : "root",
|
|
"query_sample" : "SELECT sleep(N) LIMIT N, N;",
|
|
"client_ip" : "100.*.*.247",
|
|
"type" : "SELECT"
|
|
} ],
|
|
"total_count" : 1
|
|
}</pre>
|
|
</li><li id="rds_07_0002__li1953636143515">Abnormal response<p id="rds_07_0002__p17243132562"><a name="rds_07_0002__li1953636143515"></a><a name="li1953636143515"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_07_0002__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_07_0002__en-us_topic_0032347778_ul7858132212142"><li id="rds_07_0002__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_07_0002__en-us_topic_0032347778_p1040982941020"><a name="rds_07_0002__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
|
|
</li><li id="rds_07_0002__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_07_0002__en-us_topic_0032347778_p0723374409"><a name="rds_07_0002__en-us_topic_0032347778_li11583183218149"></a><a name="en-us_topic_0032347778_li11583183218149"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_07_0002__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_07_0002__en-us_topic_0032347778_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
|
|
</div>
|
|
<p id="rds_07_0002__p8060118"></p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_07_0001.html">API v3.1 (Recommended)</a></div>
|
|
</div>
|
|
</div>
|
|
|