Skip to main content

SHOW-LOAD-PROFILE

SHOW-LOAD-PROFILE​

Name​

SHOW LOAD PROFILE

caution

Since 2.1.1, this syntax is deprecated.

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:

SET is_report_success=true;

Versions 0.15 and later perform the following settings:

SET [GLOBAL] enable_profile=true;

grammar:

show load profile "/";

show load profile "/[queryId]"

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

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

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

    mysql> show load profile "/"\G

*************************** 1. row *************************** JobId: 20010 QueryId: 980014623046410a-af5d36f23381017f User: root DefaultDb: default_cluster:test SQL: LOAD LABEL xxx QueryType: Load StartTime: 2023-03-07 19:48:24 EndTime: 2023-03-07 19:50:45 TotalTime: 2m21s QueryState: N/A TraceId: AnalysisTime: NULL PlanTime: NULL ScheduleTime: NULL FetchResultTime: NULL WriteResultTime: NULL WaitAndFetchResultTime: NULL *************************** 2. row *************************** JobId: N/A QueryId: 7cc2d0282a7a4391-8dd75030185134d8 User: root DefaultDb: default_cluster:test SQL: insert into xxx QueryType: Load StartTime: 2023-03-07 19:49:15 EndTime: 2023-03-07 19:49:15 TotalTime: 102ms QueryState: OK TraceId: AnalysisTime: 825.277us PlanTime: 4.126ms ScheduleTime: N/A FetchResultTime: 0ns WriteResultTime: 0ns WaitAndFetchResultTime: N/A


2. View an overview of the subtasks with imported jobs:

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

    show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f";

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚[-1: OlapTableSink] β”‚
    β”‚Fragment: 0 β”‚
    β”‚MaxActiveTime: 86.541msβ”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”‚
    β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚[1: VEXCHANGE_NODE]β”‚
    β”‚Fragment: 0 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚[MemoryUsage]β”‚ β”‚[1: VDataStreamSender] β”‚
    β”‚Fragment: 0 β”‚ β”‚Fragment: 1 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚MaxActiveTime: 34.882msβ”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”‚
    β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚[0: VNewOlapScanNode(tbl1)]β”‚
    β”‚Fragment: 1 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚[MemoryUsage]β”‚ β”‚[VScanner] β”‚
    β”‚Fragment: 1 β”‚ β”‚Fragment: 1β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚[SegmentIterator]β”‚ β”‚[MemoryUsage]β”‚
    β”‚Fragment: 1 β”‚ β”‚Fragment: 1 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

    ```sql

    This will show the plan tree and fragment id on it

  2. View the Instance overview of the specified subtask

    mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f/1"\G
    +-----------------------------------+------------------+------------+
    | Instances | Host | ActiveTime |
    +-----------------------------------+------------------+------------+
    | 980014623046410a-88e260f0c43031f2 | 10.81.85.89:9067 | 3m7s |
    | 980014623046410a-88e260f0c43031f3 | 10.81.85.89:9067 | 3m6s |
    | 980014623046410a-88e260f0c43031f4 | 10.81.85.89:9067 | 3m10s |
    | 980014623046410a-88e260f0c43031f5 | 10.81.85.89:9067 | 3m14s |
    +-----------------------------------+------------------+------------+
  3. Continue to view the detailed Profile of each operator on a specific Instance

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

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

    Instance:

    β”Œ-----------------------------------------┐
    β”‚[-1: OlapTableSink] β”‚
    β”‚(Active: 2m17s, non-child: 70.91) β”‚
    β”‚ - Counters: β”‚
    β”‚ - CloseWaitTime: 1m53s β”‚
    β”‚ - ConvertBatchTime: 0ns β”‚
    β”‚ - MaxAddBatchExecTime: 1m46s β”‚
    β”‚ - NonBlockingSendTime: 3m11s β”‚
    β”‚ - NumberBatchAdded: 782 β”‚
    β”‚ - NumberNodeChannels: 1 β”‚
    β”‚ - OpenTime: 743.822us β”‚
    β”‚ - RowsFiltered: 0 β”‚
    β”‚ - RowsRead: 1.599729M (1599729) β”‚
    β”‚ - RowsReturned: 1.599729M (1599729)β”‚
    β”‚ - SendDataTime: 11s761ms β”‚
    β”‚ - TotalAddBatchExecTime: 1m46s β”‚
    β”‚ - ValidateDataTime: 9s802ms β”‚
    β””-----------------------------------------β”˜
    β”‚
    β”Œ-----------------------------------------------------┐
    β”‚[0: BROKER_SCAN_NODE] β”‚
    β”‚(Active: 56s537ms, non-child: 29.06) β”‚
    β”‚ - Counters: β”‚
    β”‚ - BytesDecompressed: 0.00 β”‚
    β”‚ - BytesRead: 5.77 GB β”‚
    β”‚ - DecompressTime: 0ns β”‚
    β”‚ - FileReadTime: 34s263ms β”‚
    β”‚ - MaterializeTupleTime(*): 45s54ms β”‚
    β”‚ - NumDiskAccess: 0 β”‚
    β”‚ - PeakMemoryUsage: 33.03 MB β”‚
    β”‚ - RowsRead: 1.599729M (1599729) β”‚
    β”‚ - RowsReturned: 1.599729M (1599729) β”‚
    β”‚ - RowsReturnedRate: 28.295K sec β”‚
    β”‚ - TotalRawReadTime(*): 1m20s β”‚
    β”‚ - TotalReadThroughput: 30.39858627319336 MB/secβ”‚
    β”‚ - WaitScannerTime: 56s528ms β”‚
    β””-----------------------------------------------------β”˜

Keywords​

SHOW, LOAD, PROFILE

Best Practice​