查询 SQL 执行计划
接口URL
//api/v1/cluster/statement/{clusterID}/plan?Digest=7da56eb033024989409c246b6ebc45b9ff0a75f3f96652c0c67af7d048958733
请求方式
GET
请求Query参数
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
Digest | 7da56eb033024989409c246b6ebc45b9ff0a75f3f96652c0c67af7d048958733 | String | 是 | - |
路径变量
参数名 | 示例值 | 参数描述 |
---|---|---|
clusterID | - | - |
Content-Type
json
认证方式
noauth
成功响应示例
{
"Data":[
{
"summary_begin_time":1703505600,
"summary_end_time":1703507400,
"digest_text":"create table if not exists history ( `h_c_id` int not ? , `h_c_d_id` int not ? , `h_c_w_id` int not ? , `h_d_id` int not ? , `h_w_id` int not ? , `h_date` datetime , `h_amount` decimal ( ... ) , `h_data` varchar ( ? ) , index `idx_h_w_id` ( `h_w_id` ) , index `idx_h_c_w_id` ( `h_c_w_id` ) )",
"digest":"7da56eb033024989409c246b6ebc45b9ff0a75f3f96652c0c67af7d048958733",
"exec_count":1,
"stmt_type":"CreateTable",
"sum_errors":0,
"sum_warnings":0,
"sum_latency":154583298,
"max_latency":154583298,
"min_latency":154583298,
"avg_latency":154583298,
"avg_parse_latency":213510,
"max_parse_latency":213510,
"avg_compile_latency":322953,
"max_compile_latency":322953,
"sum_cop_task_num":0,
"avg_cop_process_time":0,
"max_cop_process_time":0,
"avg_cop_wait_time":0,
"max_cop_wait_time":0,
"avg_process_time":0,
"max_process_time":0,
"avg_wait_time":0,
"max_wait_time":0,
"avg_backoff_time":0,
"max_backoff_time":0,
"avg_total_keys":0,
"max_total_keys":0,
"avg_processed_keys":0,
"max_processed_keys":0,
"avg_prewrite_time":0,
"max_prewrite_time":0,
"avg_commit_time":0,
"max_commit_time":0,
"avg_get_commit_ts_time":0,
"max_get_commit_ts_time":0,
"avg_commit_backoff_time":0,
"max_commit_backoff_time":0,
"avg_resolve_lock_time":0,
"max_resolve_lock_time":0,
"avg_local_latch_wait_time":0,
"max_local_latch_wait_time":0,
"avg_write_keys":0,
"max_write_keys":0,
"avg_write_size":0,
"max_write_size":0,
"avg_prewrite_regions":0,
"max_prewrite_regions":0,
"avg_txn_retry":0,
"max_txn_retry":0,
"sum_backoff_times":0,
"avg_mem":0,
"max_mem":0,
"avg_disk":0,
"max_disk":0,
"avg_affected_rows":0,
"first_seen":1703507350,
"last_seen":1703507350,
"sample_user":"root",
"query_sample_text":"CREATE TABLE IF NOT EXISTS history (\n\th_c_id INT NOT NULL,\n\th_c_d_id INT NOT NULL,\n\th_c_w_id INT NOT NULL,\n\th_d_id INT NOT NULL,\n\th_w_id INT NOT NULL,\n\th_date DATETIME,\n\th_amount DECIMAL(6, 2),\n\th_data VARCHAR(24),\n\tINDEX idx_h_w_id (h_w_id),\n\tINDEX idx_h_c_w_id (h_c_w_id)\n)",
"prev_sample_text":"",
"schema_name":"test1",
"table_names":"test1.history",
"index_names":"",
"plan_count":1,
"plan":"",
"binary_plan":"",
"plan_digest":"",
"plan_hint":null,
"max_rocksdb_delete_skipped_count":0,
"avg_rocksdb_delete_skipped_count":0,
"max_rocksdb_key_skipped_count":0,
"avg_rocksdb_key_skipped_count":0,
"max_rocksdb_block_cache_hit_count":0,
"avg_rocksdb_block_cache_hit_count":0,
"max_rocksdb_block_read_count":0,
"avg_rocksdb_block_read_count":0,
"max_rocksdb_block_read_byte":0,
"avg_rocksdb_block_read_byte":0,
"related_schemas":"test1",
"plan_can_be_bound":false,
"binary_plan_json":"",
"binary_plan_text":""
}
],
"Success":true
}
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
Data | - | Array | - |
Data.summary_begin_time | 1703505600 | Integer | - |
Data.summary_end_time | 1703507400 | Integer | - |
Data.digest_text | create table if not exists history ( h_c_id int not ? , h_c_d_id int not ? , h_c_w_id int not ? , h_d_id int not ? , h_w_id int not ? , h_date datetime , h_amount decimal ( ... ) , h_data varchar ( ? ) , index idx_h_w_id ( h_w_id ) , index idx_h_c_w_id ( h_c_w_id ) ) |
String | - |
Data.digest | 7da56eb033024989409c246b6ebc45b9ff0a75f3f96652c0c67af7d048958733 | String | - |
Data.exec_count | 1 | Integer | - |
Data.stmt_type | CreateTable | String | - |
Data.sum_errors | 0 | Integer | - |
Data.sum_warnings | 0 | Integer | - |
Data.sum_latency | 154583298 | Integer | - |
Data.max_latency | 154583298 | Integer | - |
Data.min_latency | 154583298 | Integer | - |
Data.avg_latency | 154583298 | Integer | - |
Data.avg_parse_latency | 213510 | Integer | - |
Data.max_parse_latency | 213510 | Integer | - |
Data.avg_compile_latency | 322953 | Integer | - |
Data.max_compile_latency | 322953 | Integer | - |
Data.sum_cop_task_num | 0 | Integer | - |
Data.avg_cop_process_time | 0 | Integer | - |
Data.max_cop_process_time | 0 | Integer | - |
Data.avg_cop_wait_time | 0 | Integer | - |
Data.max_cop_wait_time | 0 | Integer | - |
Data.avg_process_time | 0 | Integer | - |
Data.max_process_time | 0 | Integer | - |
Data.avg_wait_time | 0 | Integer | - |
Data.max_wait_time | 0 | Integer | - |
Data.avg_backoff_time | 0 | Integer | - |
Data.max_backoff_time | 0 | Integer | - |
Data.avg_total_keys | 0 | Integer | - |
Data.max_total_keys | 0 | Integer | - |
Data.avg_processed_keys | 0 | Integer | - |
Data.max_processed_keys | 0 | Integer | - |
Data.avg_prewrite_time | 0 | Integer | - |
Data.max_prewrite_time | 0 | Integer | - |
Data.avg_commit_time | 0 | Integer | - |
Data.max_commit_time | 0 | Integer | - |
Data.avg_get_commit_ts_time | 0 | Integer | - |
Data.max_get_commit_ts_time | 0 | Integer | - |
Data.avg_commit_backoff_time | 0 | Integer | - |
Data.max_commit_backoff_time | 0 | Integer | - |
Data.avg_resolve_lock_time | 0 | Integer | - |
Data.max_resolve_lock_time | 0 | Integer | - |
Data.avg_local_latch_wait_time | 0 | Integer | - |
Data.max_local_latch_wait_time | 0 | Integer | - |
Data.avg_write_keys | 0 | Integer | - |
Data.max_write_keys | 0 | Integer | - |
Data.avg_write_size | 0 | Integer | - |
Data.max_write_size | 0 | Integer | - |
Data.avg_prewrite_regions | 0 | Integer | - |
Data.max_prewrite_regions | 0 | Integer | - |
Data.avg_txn_retry | 0 | Integer | - |
Data.max_txn_retry | 0 | Integer | - |
Data.sum_backoff_times | 0 | Integer | - |
Data.avg_mem | 0 | Integer | - |
Data.max_mem | 0 | Integer | - |
Data.avg_disk | 0 | Integer | - |
Data.max_disk | 0 | Integer | - |
Data.avg_affected_rows | 0 | Integer | - |
Data.first_seen | 1703507350 | Integer | - |
Data.last_seen | 1703507350 | Integer | - |
Data.sample_user | root | String | - |
Data.query_sample_text | CREATE TABLE IF NOT EXISTS history ( h_c_id INT NOT NULL, h_c_d_id INT NOT NULL, h_c_w_id INT NOT NULL, h_d_id INT NOT NULL, h_w_id INT NOT NULL, h_date DATETIME, h_amount DECIMAL(6, 2), h_data VARCHAR(24), INDEX idx_h_w_id (h_w_id), INDEX idx_h_c_w_id (h_c_w_id)) | String | - |
Data.prev_sample_text | - | String | - |
Data.schema_name | test1 | String | - |
Data.table_names | test1.history | String | - |
Data.index_names | - | String | - |
Data.plan_count | 1 | Integer | - |
Data.plan | - | String | - |
Data.binary_plan | - | String | - |
Data.plan_digest | - | String | - |
Data.plan_hint | null | Null | - |
Data.max_rocksdb_delete_skipped_count | 0 | Integer | - |
Data.avg_rocksdb_delete_skipped_count | 0 | Integer | - |
Data.max_rocksdb_key_skipped_count | 0 | Integer | - |
Data.avg_rocksdb_key_skipped_count | 0 | Integer | - |
Data.max_rocksdb_block_cache_hit_count | 0 | Integer | - |
Data.avg_rocksdb_block_cache_hit_count | 0 | Integer | - |
Data.max_rocksdb_block_read_count | 0 | Integer | - |
Data.avg_rocksdb_block_read_count | 0 | Integer | - |
Data.max_rocksdb_block_read_byte | 0 | Integer | - |
Data.avg_rocksdb_block_read_byte | 0 | Integer | - |
Data.related_schemas | test1 | String | - |
Data.plan_can_be_bound | false | Boolean | - |
Data.binary_plan_json | - | String | - |
Data.binary_plan_text | - | String | - |
Success | true | Boolean | 调用是否成功 |