Mengkueri entri log kueri lambat untuk instans MongoDB.
Deskripsi operasi
-
This operation is applicable only to general-purpose local-disk and dedicated local-disk instances.
-
You can call this operation up to 30 times per minute. To call this operation at a higher frequency, use a Logstore. For more information, see Manage a Logstore.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:DescribeSlowLogRecords |
get |
*Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
ID Instans. Catatan
Jika Anda menetapkan parameter ini ke ID instans kluster sharded, Anda juga harus menentukan parameter |
dds-bp1fc7e65108**** |
| NodeId |
string |
No |
ID node shard. Catatan
Parameter ini hanya diperlukan ketika Anda menetapkan parameter |
d-bp18b06ebc21**** |
| StartTime |
string |
Yes |
Awal rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu dalam standar ISO 8601 dengan format yyyy-MM-ddTHH:mmZ. Pengatur waktu harus dalam UTC. |
2021-08-15T14:13Z |
| EndTime |
string |
Yes |
Akhir rentang waktu yang akan dikueri. Tentukan waktu dalam standar ISO 8601 dengan format yyyy-MM-ddTHH:mmZ. Waktu harus dalam UTC. Catatan
|
2021-08-16T14:13Z |
| DBName |
string |
No |
Nama database. |
mongodbtest |
| QueryKeywords |
string |
No |
Kata kunci yang digunakan untuk kueri. Anda dapat memasukkan hingga 10 kata kunci dalam satu pengatur waktu. Pisahkan beberapa kata kunci dengan spasi. |
test test1 |
| LogicalOperator |
string |
No |
Hubungan logis di antara beberapa kata kunci.
|
and |
| PageSize |
integer |
No |
Jumlah entri per halaman. Nilai valid: 30 hingga 100. |
30 |
| PageNumber |
integer |
No |
Nomor halaman. Nilai harus berupa bilangan bulat positif yang tidak melebihi nilai maksimum tipe data INTEGER. Nilai default: 1. |
1 |
| OrderType |
string |
No |
Pesanan pengurutan entri log berdasarkan pengatur waktu. Nilai valid:
|
asc |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya tempat instans yang ingin Anda kueri berada. |
rg-acfmyiu4ekp**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalRecordCount |
integer |
The total number of returned entries. |
1 |
| PageRecordCount |
integer |
The number of slow query log entries returned on the page. |
1 |
| RequestId |
string |
The request ID. |
8076C4BA-DDBD-529C-BFF4-D8620C3F**** |
| PageNumber |
integer |
The page number of the returned page. The value is a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 1. |
1 |
| Items |
object |
||
| LogRecords |
array<object> |
An array that consists of the information about each slow query. |
|
|
object |
|||
| ExecutionStartTime |
string |
The start time of the operation. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2019-02-25T 01:41:28Z |
| HostAddress |
string |
The host IP address that is used to connect to the database. |
192.168.XX.XX |
| QueryTimes |
string |
The execution time of the statement. Unit: milliseconds. |
600 |
| TableName |
string |
The name of the collection. |
C1 |
| SQLText |
string |
The SQL statement that is executed during the slow operation. |
{\"op\":\"query\",\"ns\":\"mongodbtest.customer\",\"query\":{\"find\":\"customer\",\"filter\":{\"name\":\"jack\"}}} |
| ReturnRowCounts |
integer |
The number of rows returned by the SQL statement. |
0 |
| KeysExamined |
integer |
The number of rows involved in index scans. |
0 |
| DBName |
string |
The name of the database. |
mongodbtest |
| DocsExamined |
integer |
The number of documents that are scanned during the operation. |
1000000 |
| AccountName |
string |
The username of the database account that performs the operation. |
test |
| Engine |
string |
The database engine. |
MongoDB |
Contoh
Respons sukses
JSONformat
{
"TotalRecordCount": 1,
"PageRecordCount": 1,
"RequestId": "8076C4BA-DDBD-529C-BFF4-D8620C3F****",
"PageNumber": 1,
"Items": {
"LogRecords": [
{
"ExecutionStartTime": "2019-02-25T 01:41:28Z",
"HostAddress": "192.168.XX.XX",
"QueryTimes": "600",
"TableName": "C1",
"SQLText": "{\\\"op\\\":\\\"query\\\",\\\"ns\\\":\\\"mongodbtest.customer\\\",\\\"query\\\":{\\\"find\\\":\\\"customer\\\",\\\"filter\\\":{\\\"name\\\":\\\"jack\\\"}}}",
"ReturnRowCounts": 0,
"KeysExamined": 0,
"DBName": "mongodbtest",
"DocsExamined": 1000000,
"AccountName": "test"
}
]
},
"Engine": "MongoDB"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IncorrectCharacterType | Current DB instance CharacterType does not support this operation. | |
| 400 | InvalidParameterCombination | The end time must be greater than the start time | |
| 400 | InvalidStartTime.Malformed | The Specified parameter StartTime is not valid. | |
| 400 | InvalidEndTime.Malformed | The Specified parameter EndTime is not valid. | |
| 403 | LogApiFrequencyExceeded | Exceeding the allowed frequency of log api. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.