Obtient les statistiques de table d'un cluster AnalyticDB for MySQL spécifié.
Description de l'opération
Pour plus d'informations sur les statistiques de table, consultez Informations de surveillance.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
adb:DescribeTableStatistics |
get |
DBCluster
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| DBClusterId |
string |
Oui |
L'identifiant du cluster. Remarque
Appelez l'opération DescribeDBClusters pour obtenir l'identifiant du cluster. |
am-**************** |
| PageSize |
integer |
Non |
Le nombre d'entrées à renvoyer sur chaque page. Valeurs valides :
|
30 |
| PageNumber |
integer |
Non |
Le numéro de page. La valeur doit être un entier positif. Valeur par défaut : 1. |
1 |
| Order |
string |
Non |
La règle de tri pour les résultats renvoyés. La valeur est un tableau JSON ordonné selon la séquence des éléments du tableau. Chaque élément se compose de
|
[ { "Field":"TableName", "Type":"Asc" } ] |
| RegionId |
string |
Non |
L'identifiant de la région. Remarque
Appelez l'opération DescribeRegions pour obtenir l'identifiant de la région. |
cn-beijing |
| Keyword |
string |
Non |
Le mot-clé pour la requête. La recherche approximative par nom de table est prise en charge. |
you_table_name |
| SchemaName |
string |
Non |
Le nom de la base de données. |
cust_pay_instruction |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
La liste des informations. |
||
| TotalCount |
string |
Le nombre total d'entrées. |
1 |
| PageSize |
string |
Le nombre d'entrées sur la page actuelle. |
30 |
| RequestId |
string |
L'identifiant de la requête. |
4C4433FF-5D3A-4C3E-A19C-6D93B2****** |
| PageNumber |
string |
Le numéro de page. |
1 |
| DBClusterId |
string |
L'identifiant du cluster. |
am-**************** |
| Items |
object |
||
| TableStatisticRecords |
array<object> |
La liste des statistiques de table. |
|
|
object |
Les détails. |
||
| 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. Remarque
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. Remarque
This parameter is returned only for clusters of kernel version 3.1.3.4 or later. |
0 |
| SpaceRatio |
number |
The tablespace ratio, in percentage. Remarque
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. Remarque
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 |
La liste des noms de base de données. |
['adb_external_tpch_10gb', 'dw_bccb', 'dw_fm', 'dw_test', 'dw_yph'] |
Exemples
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']"
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.