Query Profile Action
Request
GET /rest/v1/query_profile/<query_id>
Description
Query Profile Action 用于获取 Query 的 profile。
Path parameters
<query_id>
可选参数。当不指定时,返回最新的 query 列表。当指定时,返回指定 query 的 profile。
Query parameters
无
Request body
无
Response
不指定
<query_id>
GET /rest/v1/query_profile/
{
"msg": "success",
"code": 0,
"data": {
"href_column": ["Query ID"],
"column_names": ["Query ID", "User", "Default Db", "Sql Statement", "Query Type", "Start Time", "End Time", "Total", "Query State"],
"rows": [{
"User": "root",
"__hrefPath": ["/query_profile/d73a8a0b004f4b2f-b4829306441913da"],
"Query Type": "Query",
"Total": "5ms",
"Default Db": "default_cluster:db1",
"Sql Statement": "select * from tbl1",
"Query ID": "d73a8a0b004f4b2f-b4829306441913da",
"Start Time": "2020-09-03 10:07:54",
"Query State": "EOF",
"End Time": "2020-09-03 10:07:54"
}, {
"User": "root",
"__hrefPath": ["/query_profile/fd706dd066824c21-9d1a63af9f5cb50c"],
"Query Type": "Query",
"Total": "6ms",
"Default Db": "default_cluster:db1",
"Sql Statement": "select * from tbl1",
"Query ID": "fd706dd066824c21-9d1a63af9f5cb50c",
"Start Time": "2020-09-03 10:07:54",
"Query State": "EOF",
"End Time": "2020-09-03 10:07:54"
}]
},
"count": 3
}
返回结果同
System Action
,是一个表格的描述。指定
<query_id>
GET /rest/v1/query_profile/<query_id>
{
"msg": "success",
"code": 0,
"data": "Query:</br> Summary:</br>...",
"count": 0
}
data
为 profile 的文本内容。