Obtém estatísticas de tabelas de um cluster AnalyticDB for MySQL especificado.
Descrição da operação
Para mais informações sobre estatísticas de tabelas, consulte Informações de monitoramento.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
adb:DescribeTableStatistics |
get |
DBCluster
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| DBClusterId |
string |
Sim |
O ID do cluster. Nota
Chame a operação DescribeDBClusters para consultar o ID do cluster. |
am-bp183qgrwywa6**** |
| PageSize |
integer |
Não |
O número de entradas a serem retornadas em cada página. Valores válidos:
|
30 |
| PageNumber |
integer |
Não |
O número da página. O valor deve ser um inteiro positivo. Valor padrão: 1. |
1 |
| Order |
string |
Não |
A regra de ordenação para os resultados retornados. O valor é um array JSON ordenado pela sequência dos elementos no array. Cada elemento consiste em
|
[ { "Field":"TableName", "Type":"Asc" } ] |
| RegionId |
string |
Não |
O ID da região. Nota
Chame a operação DescribeRegions para consultar o ID da região. |
cn-beijing |
| Keyword |
string |
Não |
A palavra-chave para a consulta. A pesquisa difusa por nome de tabela é suportada. |
you_table_name |
| SchemaName |
string |
Não |
O nome do banco de dados. |
cust_pay_instruction |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
A lista de informações. |
||
| TotalCount |
string |
O número total de entradas. |
1 |
| PageSize |
string |
O número de entradas na página atual. |
30 |
| RequestId |
string |
O ID da solicitação. |
4C4433FF-5D3A-4C3E-A19C-6D93B2****** |
| PageNumber |
string |
O número da página. |
1 |
| DBClusterId |
string |
O ID do cluster. |
am-**************** |
| Items |
object |
||
| TableStatisticRecords |
array<object> |
A lista de estatísticas de tabelas. |
|
|
object |
Os detalhes. |
||
| 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. Nota
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. Nota
This parameter is returned only for clusters of kernel version 3.1.3.4 or later. |
0 |
| SpaceRatio |
number |
The tablespace ratio, in percentage. Nota
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. Nota
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 |
A lista de nomes de bancos de dados. |
['adb_external_tpch_10gb', 'dw_bccb', 'dw_fm', 'dw_test', 'dw_yph'] |
Exemplos
Resposta de sucesso
JSON formato
{
"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']"
}
Códigos de erro
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.