Query slow log details for an instance in a certain time range. MySQL, PostgreSQL, and PPAS instances are supported.

Request parameters

Name Type Required Description
Action String Yes Required parameter. Value: DescribeSlowLogRecords
DBInstanceId String Yes Instance ID.
StartTime String Yes Query start date. Format: YYYY-MM-DD’T’HH:mmZ, for example, 2011-06-11 T15:00Z.
EndTime String Yes. Query end date, which cannot be earlier than the query start date. Format: YYYY-MM-DD’T’HH:mmZ, for example, 2011-06-11 T16:00Z.
DBName String No Name of a database.
PageSize Integer No Number of records on every page. Values: 30, 50, and 100; default value: 30.
PageNumber Integer No Page number, which must be greater than 0, but must not exceed the maximum Integer value. Default value: 1.

Response parameters

Name Type Description
<Common response parameters> Fore more information, see Public parameters.
Engine String Database type.
TotalRecordCount Integer Total number of records.
PageNumber Integer Page number.
PageRecordCount Integer Number of SQL statements displayed on the current page.
Items List<SQLSlowRecord>

SQLSlowLog parameters

Name Type Description
HostAddress String Host address used for database connection.
DBName String Name of a database.
SQLText String Query statement.
QueryTimes Long Execution duration, in the unit of seconds.
LockTimes Long Lock duration, in the unit of seconds.
ParseRowCounts Long Number of parsed rows.
ReturnRowCounts Long Number of returned rows.
ExecutionStartTime String Execution start time. Format: YYYY-MM-DD’T’HH:mm:ss Z, for example, 2011-06-11 T15:00:08Z.

Request example
&<Common request parameters>

Response example

XML format

    <SQLText>update test.zxb set id=0 limit 1</SQLText>

JSON format

SQLText:” update test.zxb set id=0 limit 1”