SHOW-LOAD-PROFILE

Name

SHOW LOAD PROFILE

Description

该语句是用来查看导入操作的Profile信息,该功能需要用户打开 Profile 设置,0.15 之前版本执行下面的设置:

  1. SET is_report_success=true;

0.15 及之后的版本执行下面的设置:

  1. SET [GLOBAL] enable_profile=true;

语法:

  1. show load profile "/";
  2. show load profile "/[queryId]"

这个命令会列出当前保存的所有导入 Profile。每行对应一个导入。其中 QueryId 列为导入作业的 ID。这个 ID 也可以通过 SHOW LOAD 语句查看拿到。我们可以选择我们想看的 Profile 对应的 QueryId,查看具体情况

Example

  1. 列出所有的 Load Profile

    1. mysql> show load profile "/";
    2. +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+
    3. | QueryId | User | DefaultDb | SQL | QueryType | StartTime | EndTime | TotalTime | QueryState |
    4. +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+
    5. | 10441 | N/A | N/A | N/A | Load | 2021-04-10 22:15:37 | 2021-04-10 22:18:54 | 3m17s | N/A |
    6. +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+
    7. 2 rows in set (0.00 sec)
  2. 查看有导入作业的子任务概况:

    1. mysql> show load profile "/10441";
    2. +-----------------------------------+------------+
    3. | TaskId | ActiveTime |
    4. +-----------------------------------+------------+
    5. | 980014623046410a-88e260f0c43031f1 | 3m14s |
    6. +-----------------------------------+------------+
  3. 查看指定子任务的 Instance 概况

    1. mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1";
    2. +-----------------------------------+------------------+------------+
    3. | Instances | Host | ActiveTime |
    4. +-----------------------------------+------------------+------------+
    5. | 980014623046410a-88e260f0c43031f2 | 10.81.85.89:9067 | 3m7s |
    6. | 980014623046410a-88e260f0c43031f3 | 10.81.85.89:9067 | 3m6s |
    7. | 980014623046410a-88e260f0c43031f4 | 10.81.85.89:9067 | 3m10s |
    8. | 980014623046410a-88e260f0c43031f5 | 10.81.85.89:9067 | 3m14s |
    9. +-----------------------------------+------------------+------------+
  4. 继续查看某一个具体的 Instance 上各个算子的详细 Profile

    1. mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1/980014623046410a-88e260f0c43031f5"\G
    2. *************************** 1. row ***************************
    3. Instance:
    4. ┌-----------------------------------------┐
    5. │[-1: OlapTableSink]
    6. │(Active: 2m17s, non-child: 70.91)
    7. - Counters:
    8. - CloseWaitTime: 1m53s
    9. - ConvertBatchTime: 0ns
    10. - MaxAddBatchExecTime: 1m46s
    11. - NonBlockingSendTime: 3m11s
    12. - NumberBatchAdded: 782
    13. - NumberNodeChannels: 1
    14. - OpenTime: 743.822us
    15. - RowsFiltered: 0
    16. - RowsRead: 1.599729M (1599729)
    17. - RowsReturned: 1.599729M (1599729)│
    18. - SendDataTime: 11s761ms
    19. - TotalAddBatchExecTime: 1m46s
    20. - ValidateDataTime: 9s802ms
    21. └-----------------------------------------┘
    22. ┌-----------------------------------------------------┐
    23. │[0: BROKER_SCAN_NODE]
    24. │(Active: 56s537ms, non-child: 29.06)
    25. - Counters:
    26. - BytesDecompressed: 0.00
    27. - BytesRead: 5.77 GB
    28. - DecompressTime: 0ns
    29. - FileReadTime: 34s263ms
    30. - MaterializeTupleTime(*): 45s54ms
    31. - NumDiskAccess: 0
    32. - PeakMemoryUsage: 33.03 MB
    33. - RowsRead: 1.599729M (1599729)
    34. - RowsReturned: 1.599729M (1599729)
    35. - RowsReturnedRate: 28.295K sec
    36. - TotalRawReadTime(*): 1m20s
    37. - TotalReadThroughput: 30.39858627319336 MB/sec
    38. - WaitScannerTime: 56s528ms
    39. └-----------------------------------------------------┘

Keywords

  1. SHOW, LOAD, PROFILE

Best Practice