SHOW-LOAD-PROFILE

Name

SHOW LOAD PROFILE

Description

This statement is used to view the Profile information of the import operation. This function requires the user to open the Profile settings. The versions before 0.15 perform the following settings:

1. SET is_report_success=true;

Versions 0.15 and later perform the following settings:

1. SET [GLOBAL] enable_profile=true;

grammar:

1. show load profile "/";

3. show load profile "/[queryId]"

5. show load profile "/[queryId]/[TaskId]"

7. show load profile "/[queryId]/[TaskId]/[FragmentId]/"

9. show load profile "/[queryId]/[TaskId]/[FragmentId]/[InstanceId]"

This command will list all currently saved import profiles. Each line corresponds to one import. where the QueryId column is the ID of the import job. This ID can also be viewed through the SHOW LOAD statement. We can select the QueryId corresponding to the Profile we want to see to see the specific situation

Example

  1. List all Load Profiles

1. mysql> show load profile "/"\G 2. *************************** 1. row *************************** 3. JobId: 20010 4. QueryId: 980014623046410a-af5d36f23381017f 5. User: root 6. DefaultDb: default_cluster:test 7. SQL: LOAD LABEL xxx 8. QueryType: Load 9. StartTime: 2023-03-07 19:48:24 10. EndTime: 2023-03-07 19:50:45 11. TotalTime: 2m21s 12. QueryState: N/A 13. TraceId: 14. AnalysisTime: NULL 15. PlanTime: NULL 16. ScheduleTime: NULL 17. FetchResultTime: NULL 18. WriteResultTime: NULL 19. WaitAndFetchResultTime: NULL 20. *************************** 2. row *************************** 21. JobId: N/A 22. QueryId: 7cc2d0282a7a4391-8dd75030185134d8 23. User: root 24. DefaultDb: default_cluster:test 25. SQL: insert into xxx 26. QueryType: Load 27. StartTime: 2023-03-07 19:49:15 28. EndTime: 2023-03-07 19:49:15 29. TotalTime: 102ms 30. QueryState: OK 31. TraceId: 32. AnalysisTime: 825.277us 33. PlanTime: 4.126ms 34. ScheduleTime: N/A 35. FetchResultTime: 0ns 36. WriteResultTime: 0ns 37. WaitAndFetchResultTime: N/A 2. View an overview of the subtasks with imported jobs:

1. mysql> show load profile "/980014623046410a-af5d36f23381017f"; 2. +-----------------------------------+------------+ 3. | TaskId | ActiveTime | 4. +-----------------------------------+------------+ 5. | 980014623046410a-af5d36f23381017f | 3m14s | 6. +-----------------------------------+------------+ 3. View the plan tree of the specified subtask

``` 1. show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f";

  1. ┌───────────────────────┐
  2. │[-1: OlapTableSink] │
  3. │Fragment: 0 │
  4. │MaxActiveTime: 86.541ms│
  5. └───────────────────────┘
  6. │
  7. │
  8. ┌───────────────────┐
  9. │[1: VEXCHANGE_NODE]│
  10. │Fragment: 0 │
  11. └───────────────────┘
  12. ┌─────────────────────────┴───────┐
  13. │ │
  14. ┌─────────────┐ ┌───────────────────────┐
  15. │[MemoryUsage]│ │[1: VDataStreamSender] │
  16. │Fragment: 0 │ │Fragment: 1 │
  17. └─────────────┘ │MaxActiveTime: 34.882ms│
  18. └───────────────────────┘
  19. │
  20. │
  21. ┌───────────────────────────┐
  22. │[0: VNewOlapScanNode(tbl1)]│
  23. │Fragment: 1 │
  24. └───────────────────────────┘
  25. ┌─────────────────┴───────┐
  26. │ │
  27. ┌─────────────┐ ┌───────────┐
  28. │[MemoryUsage]│ │[VScanner] │
  29. │Fragment: 1 │ │Fragment: 1│
  30. └─────────────┘ └───────────┘
  31. ┌───────┴─────────┐
  32. │ │
  33. ┌─────────────────┐ ┌─────────────┐
  34. │[SegmentIterator]│ │[MemoryUsage]│
  35. │Fragment: 1 │ │Fragment: 1 │
  36. └─────────────────┘ └─────────────┘

  37. ```sql

  38. This will show the plan tree and fragment id on it ```

  39. View the Instance overview of the specified subtask

1. mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f/1"\G 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. +-----------------------------------+------------------+------------+ 5. Continue to view the detailed Profile of each operator on a specific Instance

``` 1. mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f/1/980014623046410a-88e260f0c43031f5"\G

  1. ***** 1. row *******

  2. Instance:

  3. ┌-----------------------------------------┐

  4. │[-1: OlapTableSink] │
  5. │(Active: 2m17s, non-child: 70.91) │
  6. │ - Counters: │
  7. │ - CloseWaitTime: 1m53s │
  8. │ - ConvertBatchTime: 0ns │
  9. │ - MaxAddBatchExecTime: 1m46s │
  10. │ - NonBlockingSendTime: 3m11s │
  11. │ - NumberBatchAdded: 782 │
  12. │ - NumberNodeChannels: 1 │
  13. │ - OpenTime: 743.822us │
  14. │ - RowsFiltered: 0 │
  15. │ - RowsRead: 1.599729M (1599729) │
  16. │ - RowsReturned: 1.599729M (1599729)│
  17. │ - SendDataTime: 11s761ms │
  18. │ - TotalAddBatchExecTime: 1m46s │
  19. │ - ValidateDataTime: 9s802ms │
  20. └-----------------------------------------┘
  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