Query Profile Action

Request

  1. 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>

    1. GET /rest/v1/query_profile/
    2. {
    3. "msg": "success",
    4. "code": 0,
    5. "data": {
    6. "href_column": ["Query ID"],
    7. "column_names": ["Query ID", "User", "Default Db", "Sql Statement", "Query Type", "Start Time", "End Time", "Total", "Query State"],
    8. "rows": [{
    9. "User": "root",
    10. "__hrefPath": ["/query_profile/d73a8a0b004f4b2f-b4829306441913da"],
    11. "Query Type": "Query",
    12. "Total": "5ms",
    13. "Default Db": "default_cluster:db1",
    14. "Sql Statement": "select * from tbl1",
    15. "Query ID": "d73a8a0b004f4b2f-b4829306441913da",
    16. "Start Time": "2020-09-03 10:07:54",
    17. "Query State": "EOF",
    18. "End Time": "2020-09-03 10:07:54"
    19. }, {
    20. "User": "root",
    21. "__hrefPath": ["/query_profile/fd706dd066824c21-9d1a63af9f5cb50c"],
    22. "Query Type": "Query",
    23. "Total": "6ms",
    24. "Default Db": "default_cluster:db1",
    25. "Sql Statement": "select * from tbl1",
    26. "Query ID": "fd706dd066824c21-9d1a63af9f5cb50c",
    27. "Start Time": "2020-09-03 10:07:54",
    28. "Query State": "EOF",
    29. "End Time": "2020-09-03 10:07:54"
    30. }]
    31. },
    32. "count": 3
    33. }

    返回结果同 System Action,是一个表格的描述。

  • 指定 <query_id>

    1. GET /rest/v1/query_profile/<query_id>
    2. {
    3. "msg": "success",
    4. "code": 0,
    5. "data": "Query:</br>&nbsp;&nbsp;&nbsp;&nbsp;Summary:</br>...",
    6. "count": 0
    7. }

    data 为 profile 的文本内容。