diff --git a/docs/en/docs/advanced/best-practice/import-analysis.md b/docs/en/docs/advanced/best-practice/import-analysis.md index 793c7beef07aa4..967e21a38a41c3 100644 --- a/docs/en/docs/advanced/best-practice/import-analysis.md +++ b/docs/en/docs/advanced/best-practice/import-analysis.md @@ -68,12 +68,43 @@ Then submit a Broker Load import request and wait until the import execution com We can get the Profile list first with the following command: ```sql -mysql> show load profile "/"; -+---------+------+-----------+------+------------+- --------------------+---------------------------------+------- ----+------------+ -| QueryId | User | DefaultDb | SQL | QueryType | StartTime | EndTime | TotalTime | QueryState | -+---------+------+-----------+------+------------+- --------------------+---------------------------------+------- ----+------------+ -| 10441 | N/A | N/A | N/A | Load | 2021-04-10 22:15:37 | 2021-04-10 22:18:54 | 3m17s | N/A | -+---------+------+-----------+------+------------+- --------------------+---------------------------------+------- ----+------------+ +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 ```` 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. @@ -87,15 +118,15 @@ This command will list all currently saved import profiles. Each line correspond ```sql - mysql> show load profile "/10441"; + mysql> show load profile "/980014623046410a-af5d36f23381017f"; +-----------------------------------+------------+ - | TaskId | ActiveTime | + | TaskId | ActiveTime | +-----------------------------------+------------+ - | 980014623046410a-88e260f0c43031f1 | 3m14s | + | 980014623046410a-af5d36f23381017f | 3m14s | +-----------------------------------+------------+ ```` -As shown in the figure above, it means that the import job 10441 has a total of one subtask, in which ActiveTime indicates the execution time of the longest instance in this subtask. +As shown in the figure above, it means that the import job `980014623046410a-af5d36f23381017f` has a total of one subtask, in which ActiveTime indicates the execution time of the longest instance in this subtask. 2. View the Instance overview of the specified subtask @@ -104,18 +135,18 @@ As shown in the figure above, it means that the import job 10441 has a total of ```sql - mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1"; - +-----------------------------------+------------- -----+------------+ - | 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 | - +-----------------------------------+------------- -----+------------+ + mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f"; + +-----------------------------------+------------------+------------+ + | 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 | + +-----------------------------------+------------------+------------+ ```` -This shows the time-consuming of four instances of the subtask 980014623046410a-88e260f0c43031f1, and also shows the execution node where the instance is located. +This shows the time-consuming of four instances of the subtask 980014623046410a-af5d36f23381017f, and also shows the execution node where the instance is located. 3. View the specific Instance @@ -124,7 +155,7 @@ This shows the time-consuming of four instances of the subtask 980014623046410a- ```sql - mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1/980014623046410a-88e260f0c43031f5"\G + mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f/980014623046410a-88e260f0c43031f5"\G **************************** 1. row ******************** ****** Instance: ┌-----------------------------------------┐ @@ -166,6 +197,6 @@ This shows the time-consuming of four instances of the subtask 980014623046410a- └------------------------------------------------- ----┘ ```` -The figure above shows the specific profiles of each operator of Instance 980014623046410a-88e260f0c43031f5 in subtask 980014623046410a-88e260f0c43031f1. +The figure above shows the specific profiles of each operator of Instance 980014623046410a-af5d36f23381017f in subtask 980014623046410a-88e260f0c43031f5. Through the above three steps, we can gradually check the execution bottleneck of an import task. diff --git a/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-LOAD-PROFILE.md b/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-LOAD-PROFILE.md index 1382f816420871..d17e1cb0ce49f4 100644 --- a/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-LOAD-PROFILE.md +++ b/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-LOAD-PROFILE.md @@ -59,30 +59,60 @@ This command will list all currently saved import profiles. Each line correspond 1. List all Load Profiles ```sql - mysql> show load profile "/"; - +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ - | QueryId | User | DefaultDb | SQL | QueryType | StartTime | EndTime | TotalTime | QueryState | - +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ - | 10441 | N/A | N/A | N/A | Load | 2021-04-10 22:15:37 | 2021-04-10 22:18:54 | 3m17s | N/A | - +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ - 2 rows in set (0.00 sec) + 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 "/10441"; + mysql> show load profile "/980014623046410a-af5d36f23381017f"; +-----------------------------------+------------+ | TaskId | ActiveTime | +-----------------------------------+------------+ - | 980014623046410a-88e260f0c43031f1 | 3m14s | + | 980014623046410a-af5d36f23381017f | 3m14s | +-----------------------------------+------------+ ```` 3. View the Instance overview of the specified subtask ```sql - mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1"; + mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f/980014623046410a-88e260f0c43031f5"\G +-----------------------------------+------------------+------------+ | Instances | Host | ActiveTime | +-----------------------------------+------------------+------------+ diff --git a/docs/zh-CN/docs/advanced/best-practice/import-analysis.md b/docs/zh-CN/docs/advanced/best-practice/import-analysis.md index e120ef34c2c6e0..02b1a5e8555b91 100644 --- a/docs/zh-CN/docs/advanced/best-practice/import-analysis.md +++ b/docs/zh-CN/docs/advanced/best-practice/import-analysis.md @@ -67,12 +67,43 @@ SET is_report_success=true; 我们可以通过如下命令先获取 Profile 列表: ```sql -mysql> show load profile "/"; -+---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ -| QueryId | User | DefaultDb | SQL | QueryType | StartTime | EndTime | TotalTime | QueryState | -+---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ -| 10441 | N/A | N/A | N/A | Load | 2021-04-10 22:15:37 | 2021-04-10 22:18:54 | 3m17s | N/A | -+---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ +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 ``` 这个命令会列出当前保存的所有导入 Profile。每行对应一个导入。其中 QueryId 列为导入作业的 ID。这个 ID 也可以通过 SHOW LOAD 语句查看拿到。我们可以选择我们想看的 Profile 对应的 QueryId,查看具体情况。 @@ -86,15 +117,15 @@ mysql> show load profile "/"; ```sql - mysql> show load profile "/10441"; + mysql> show load profile "/980014623046410a-af5d36f23381017f"; +-----------------------------------+------------+ | TaskId | ActiveTime | +-----------------------------------+------------+ - | 980014623046410a-88e260f0c43031f1 | 3m14s | + | 980014623046410a-af5d36f23381017f | 3m14s | +-----------------------------------+------------+ ``` - 如上图,表示 10441 这个导入作业总共有一个子任务,其中 ActiveTime 表示这个子任务中耗时最长的 Instance 的执行时间。 + 如上图,表示 `980014623046410a-af5d36f23381017f` 这个导入作业总共有一个子任务,其中 ActiveTime 表示这个子任务中耗时最长的 Instance 的执行时间。 2. 查看指定子任务的 Instance 概况 @@ -103,7 +134,7 @@ mysql> show load profile "/"; ```sql - mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1"; + mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f"; +-----------------------------------+------------------+------------+ | Instances | Host | ActiveTime | +-----------------------------------+------------------+------------+ @@ -114,7 +145,7 @@ mysql> show load profile "/"; +-----------------------------------+------------------+------------+ ``` - 这里展示了 980014623046410a-88e260f0c43031f1 这个子任务的四个 Instance 耗时,并且还展示了 Instance 所在的执行节点。 + 这里展示了 980014623046410a-af5d36f23381017f 这个子任务的四个 Instance 耗时,并且还展示了 Instance 所在的执行节点。 3. 查看具体 Instance @@ -123,7 +154,7 @@ mysql> show load profile "/"; ```sql - mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1/980014623046410a-88e260f0c43031f5"\G + mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f/980014623046410a-88e260f0c43031f5"\G *************************** 1. row *************************** Instance: ┌-----------------------------------------┐ @@ -165,6 +196,6 @@ mysql> show load profile "/"; └-----------------------------------------------------┘ ``` - 上图展示了子任务 980014623046410a-88e260f0c43031f1 中,Instance 980014623046410a-88e260f0c43031f5 的各个算子的具体 Profile。 + 上图展示了子任务 980014623046410a-af5d36f23381017f 中,Instance 980014623046410a-88e260f0c43031f5 的各个算子的具体 Profile。 通过以上3个步骤,我们可以逐步排查一个导入任务的执行瓶颈。 diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-LOAD-PROFILE.md b/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-LOAD-PROFILE.md index 763fa5a3dbee42..f53f195b67ff0e 100644 --- a/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-LOAD-PROFILE.md +++ b/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-LOAD-PROFILE.md @@ -59,30 +59,60 @@ show load profile "/[queryId]" 1. 列出所有的 Load Profile ```sql - mysql> show load profile "/"; - +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ - | QueryId | User | DefaultDb | SQL | QueryType | StartTime | EndTime | TotalTime | QueryState | - +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ - | 10441 | N/A | N/A | N/A | Load | 2021-04-10 22:15:37 | 2021-04-10 22:18:54 | 3m17s | N/A | - +---------+------+-----------+------+-----------+---------------------+---------------------+-----------+------------+ - 2 rows in set (0.00 sec) + 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. 查看有导入作业的子任务概况: ```sql - mysql> show load profile "/10441"; + mysql> show load profile "/980014623046410a-af5d36f23381017f"; +-----------------------------------+------------+ | TaskId | ActiveTime | +-----------------------------------+------------+ - | 980014623046410a-88e260f0c43031f1 | 3m14s | + | 980014623046410a-af5d36f23381017f | 3m14s | +-----------------------------------+------------+ ``` 3. 查看指定子任务的 Instance 概况 ```sql - mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1"; + mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f"; +-----------------------------------+------------------+------------+ | Instances | Host | ActiveTime | +-----------------------------------+------------------+------------+ @@ -96,7 +126,7 @@ show load profile "/[queryId]" 4. 继续查看某一个具体的 Instance 上各个算子的详细 Profile ```sql - mysql> show load profile "/10441/980014623046410a-88e260f0c43031f1/980014623046410a-88e260f0c43031f5"\G + mysql> show load profile "/980014623046410a-af5d36f23381017f/980014623046410a-af5d36f23381017f/980014623046410a-88e260f0c43031f5"\G *************************** 1. row *************************** diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowLoadProfileStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowLoadProfileStmt.java index a30ef18b9fac29..5175348674204e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowLoadProfileStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowLoadProfileStmt.java @@ -27,9 +27,9 @@ // For stmt like: // show load profile "/"; # list all saving load job ids -// show load profile "/10014" # show task ids of specified job -// show load profile "/10014/e0f7390f5363419e-b416a2a79996083e/" # show instance list of the task -// show load profile "/10014/e0f7390f5363419e-b416a2a79996083e/e0f7390f5363419e-b416a2a7999" # show instance's graph +// show load profile "/e0f7390f5363419e-xxx" # show task ids of specified job +// show load profile "/e0f7390f5363419e-xxx/e0f7390f5363419e-yyy/" # show instance list of the task +// show load profile "/e0f7390f5363419e-xxx/e0f7390f5363419e-yyy/e0f7390f5363419e-zzz" # show instance's graph public class ShowLoadProfileStmt extends ShowStmt { private static final ShowResultSetMetaData META_DATA_TASK_IDS = ShowResultSetMetaData.builder() @@ -38,7 +38,7 @@ public class ShowLoadProfileStmt extends ShowStmt { .build(); public enum PathType { - JOB_IDS, + QUERY_IDS, TASK_IDS, INSTANCES, SINGLE_INSTANCE @@ -76,14 +76,14 @@ public void analyze(Analyzer analyzer) throws UserException { super.analyze(analyzer); if (Strings.isNullOrEmpty(idPath)) { // list all query ids - pathType = PathType.JOB_IDS; + pathType = PathType.QUERY_IDS; return; } if (!idPath.startsWith("/")) { throw new AnalysisException("Path must starts with '/'"); } - pathType = PathType.JOB_IDS; + pathType = PathType.QUERY_IDS; String[] parts = idPath.split("/"); if (parts.length > 4) { throw new AnalysisException("Path must in format '/jobId/taskId/instanceId'"); @@ -92,7 +92,7 @@ public void analyze(Analyzer analyzer) throws UserException { for (int i = 0; i < parts.length; i++) { switch (i) { case 0: - pathType = PathType.JOB_IDS; + pathType = PathType.QUERY_IDS; continue; case 1: jobId = parts[i]; @@ -126,7 +126,7 @@ public String toString() { @Override public ShowResultSetMetaData getMetaData() { switch (pathType) { - case JOB_IDS: + case QUERY_IDS: return ShowQueryProfileStmt.META_DATA_QUERY_IDS; case TASK_IDS: return META_DATA_TASK_IDS; diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/ProfileManager.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/ProfileManager.java index 7734e76db8fb13..d3366bb3b14c1a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/util/ProfileManager.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/ProfileManager.java @@ -21,6 +21,7 @@ import org.apache.doris.common.AuthenticationException; import org.apache.doris.common.Config; import org.apache.doris.common.DdlException; +import org.apache.doris.common.Pair; import org.apache.doris.common.profile.MultiProfileTreeBuilder; import org.apache.doris.common.profile.ProfileTreeBuilder; import org.apache.doris.common.profile.ProfileTreeNode; @@ -166,9 +167,12 @@ public ProfileElement createElement(RuntimeProfile profile) { for (String header : PROFILE_HEADERS) { element.infoStrings.put(header, summaryProfile.getInfoString(header)); } - RuntimeProfile executionProfile = summaryProfile.getChildList().get(0).first; - for (String header : EXECUTION_HEADERS) { - element.infoStrings.put(header, executionProfile.getInfoString(header)); + List> childList = summaryProfile.getChildList(); + if (!childList.isEmpty()) { + RuntimeProfile executionProfile = childList.get(0).first; + for (String header : EXECUTION_HEADERS) { + element.infoStrings.put(header, executionProfile.getInfoString(header)); + } } MultiProfileTreeBuilder builder = new MultiProfileTreeBuilder(profile); @@ -189,8 +193,8 @@ public void pushProfile(RuntimeProfile profile) { } ProfileElement element = createElement(profile); - String key = isQueryProfile(profile) ? element.infoStrings.get(ProfileManager.QUERY_ID) - : element.infoStrings.get(ProfileManager.JOB_ID); + // 'insert into' does have job_id, put all profiles key with query_id + String key = element.infoStrings.get(ProfileManager.QUERY_ID); // check when push in, which can ensure every element in the list has QUERY_ID column, // so there is no need to check when remove element from list. if (Strings.isNullOrEmpty(key)) { @@ -383,10 +387,6 @@ public String getQueryIdByTraceId(String traceId) { } } - public boolean isQueryProfile(RuntimeProfile profile) { - return "Query".equals(profile.getName()); - } - public void setQErrorToProfileElementObject(String queryId, double qError) { ProfileElement profileElement = findProfileElementObject(queryId); if (profileElement != null) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/httpv2/controller/QueryProfileController.java b/fe/fe-core/src/main/java/org/apache/doris/httpv2/controller/QueryProfileController.java index a75b1c7071e417..775d59c0aaa952 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/httpv2/controller/QueryProfileController.java +++ b/fe/fe-core/src/main/java/org/apache/doris/httpv2/controller/QueryProfileController.java @@ -45,7 +45,7 @@ public class QueryProfileController extends BaseController { private static final String ID = "id"; private static final String DETAIL_COL = "Detail"; - private static final Set QUERY_ID_TYPES = ImmutableSet.of("Query", "Insert"); + private static final Set QUERY_ID_TYPES = ImmutableSet.of("Query", "Load"); @RequestMapping(path = "/query_profile/{" + ID + "}", method = RequestMethod.GET) public Object profile(@PathVariable(value = ID) String id) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java index d7090f196d91a8..9aa7a0de5b8a5f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java @@ -2033,7 +2033,7 @@ private void handleShowLoadProfile() throws AnalysisException { ShowLoadProfileStmt.PathType pathType = showStmt.getPathType(); List> rows = Lists.newArrayList(); switch (pathType) { - case JOB_IDS: + case QUERY_IDS: rows = ProfileManager.getInstance().getQueryWithType(ProfileManager.ProfileType.LOAD); break; case TASK_IDS: { diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java index d0c865c2bf4eb0..6a6a4a46007a20 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java @@ -595,7 +595,7 @@ public void execute(TUniqueId queryId) throws Exception { try { handleInsertStmt(); if (!((InsertStmt) parsedStmt).getQueryStmt().isExplain()) { - queryType = "Insert"; + queryType = "Load"; } } catch (Throwable t) { LOG.warn("handle insert stmt fail: {}", t.getMessage());