drs__ShowReplayResults
Retrieve DRS replay results to inspect time-based statistics, slow SQL, and error SQL, helping troubleshoot database replay jobs.
Instructions
[DRS] 获取录制回放结果数据,包括:回放基于时间维度统计信息,异常SQL及统计结果、慢SQL及统计结果
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"job_id": "<job_id>",
"project_id": "<project_id>",
"type": "<type>"
},
"name": "drs__ShowReplayResults"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | 结果类型。取值: | |
| limit | No | 分页查询数据表当前页数据总量,在type为slow_sql、error_sql、slow_sql_template、error_sql_template必填 | |
| job_id | Yes | 任务ID。 | |
| offset | No | 分页查询数据表当前超始偏移量, 在type为slow_sql、error_sql、slow_sql_template、error_sql_template必填 | |
| end_time | No | 查询数据的结束时间,在type为shard_statistics、slow_sql、error_sql时必填 | |
| sort_dir | No | 排序规则,取值如下: | desc |
| sort_key | No | 返回结果按该关键字排序(slow_sql_template支持count,maxLatency、avgLatency关键字,error_sql_template支持count关键字) | |
| is_sample | No | 是否查询样例true/false,type=slow_sql/error_sql时生效,值为true时只查询一条样例数据。 | |
| error_type | No | 错误分类,type=error_sql/error_sql_template时生效,根据错误分类过滤数据。 | |
| project_id | Yes | 租户在某一Region下的Project ID。 获取方法请参见[获取项目ID。](https://support.huaweicloud.com/api-drs/drs_api_0106.html) | |
| start_time | No | 查询数据的起始时间,在type为shard_statistics、slow_sql、error_sql时必填 | |
| target_name | No | 回放数据库名称,用于在一致性回放策略场景,过滤目标库与源库镜像库回放结果。参数非必须,不提供则默认查询所有数据,其取值如下: | |
| sql_template_md5 | No | sql模板md5,type=slow_sql/error_sql时生效,根据模板过滤对应的异常SQL和慢SQL,该值为本接口type=slow_sql_template/error_sql_template时的返回字段。 |