Retrieves table statistics from a specified AnalyticDB for MySQL cluster.
Operation description
For more information about table statistics, see Monitoring information.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:DescribeTableStatistics |
get |
DBCluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. Note
Call the DescribeDBClusters operation to query the cluster ID. |
am-**************** |
| PageSize |
integer |
No |
The number of entries to return on each page. Valid values:
|
30 |
| PageNumber |
integer |
No |
The page number. The value must be a positive integer. Default value: 1. |
1 |
| Order |
string |
No |
The sorting rule for the returned results. The value is a JSON array that is ordered by the sequence of the elements in the array. Each element consists of
|
[ { "Field":"TableName", "Type":"Asc" } ] |
| RegionId |
string |
No |
The region ID. Note
Call the DescribeRegions operation to query the region ID. |
cn-beijing |
| Keyword |
string |
No |
The keyword for the query. Fuzzy search by table name is supported. |
you_table_name |
| SchemaName |
string |
No |
The database name. |
cust_pay_instruction |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The list of information. |
||
| TotalCount |
string |
The total number of entries. |
1 |
| PageSize |
string |
The number of entries on the current page. |
30 |
| RequestId |
string |
The request ID. |
4C4433FF-5D3A-4C3E-A19C-6D93B2****** |
| PageNumber |
string |
The page number. |
1 |
| DBClusterId |
string |
The cluster ID. |
am-**************** |
| Items |
object |
||
| TableStatisticRecords |
array<object> |
The list of table statistics. |
|
|
object |
The details. |
||
| SchemaName |
string |
The database name. |
test_schema |
| TableName |
string |
The table name. |
test_table |
| RowCount |
integer |
The number of rows in the table. |
3 |
| DataSize |
integer |
The data size of the table records, in bytes. Note
The data size of table records does not include the data of common indexes and primary key indexes. |
15592 |
| IndexSize |
integer |
The data size of common indexes, in bytes. |
3076 |
| PrimaryKeyIndexSize |
integer |
The data size of primary key indexes, in bytes. |
16340 |
| PartitionCount |
integer |
The number of partitions. |
1 |
| ColdDataSize |
integer |
The total size of cold data, in bytes. Note
This parameter is returned only for clusters of kernel version 3.1.3.4 or later. |
0 |
| SpaceRatio |
number |
The tablespace ratio, in percentage. Note
Formula: Tablespace ratio = Total data size of the table / Total data size of the instance × 100. |
66.23 |
| TotalSize |
integer |
The total data size, in bytes. Note
The total data size is calculated using one of the following formulas: Total data size = Hot data size + Cold data size, or Total data size = Data size of table records + Data size of common indexes + Data size of primary key indexes + Other data size. |
1577 |
| HotDataSize |
integer |
The size of hot data, in bytes. |
1048576 |
| OtherSize |
integer |
The size of other data, in bytes. |
1048576 |
| SchemaNames |
string |
The list of database names. |
['adb_external_tpch_10gb', 'dw_bccb', 'dw_fm', 'dw_test', 'dw_yph'] |
Examples
Success response
JSON format
{
"TotalCount": "1",
"PageSize": "30",
"RequestId": "4C4433FF-5D3A-4C3E-A19C-6D93B2******",
"PageNumber": "1",
"DBClusterId": "am-****************",
"Items": {
"TableStatisticRecords": [
{
"SchemaName": "test_schema",
"TableName": "test_table",
"RowCount": 3,
"DataSize": 15592,
"IndexSize": 3076,
"PrimaryKeyIndexSize": 16340,
"PartitionCount": 1,
"ColdDataSize": 0,
"SpaceRatio": 66.23,
"TotalSize": 1577,
"HotDataSize": 1048576,
"OtherSize": 1048576
}
]
},
"SchemaNames": "['adb_external_tpch_10gb', 'dw_bccb', 'dw_fm', 'dw_test', 'dw_yph']"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.