This is an automated email from the ASF dual-hosted git repository.
eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 612a5cbd396 [Optimize](ShortCircuit) Avoid unnecessary overheap in FE
(#56069)
612a5cbd396 is described below
commit 612a5cbd396c5fc3cb58355ad5df28d277e4df93
Author: lihangyu <[email protected]>
AuthorDate: Mon Sep 15 21:28:47 2025 +0800
[Optimize](ShortCircuit) Avoid unnecessary overheap in FE (#56069)
Avoid overhead:
1. profile update
2. dump changed vars
---
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
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 b994ea2bbbc..0aa3c99b32b 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
@@ -596,7 +596,8 @@ public class StmtExecutor {
context.setStartTime();
profile.getSummaryProfile().setQueryBeginTime(TimeUtils.getStartTimeMs());
- if (context.getSessionVariable().enableProfile) {
+ // short circuit query should not dump changed session var since it
will impact the performance.
+ if (context.getSessionVariable().enableProfile &&
!statementContext.isShortCircuitQuery()) {
List<List<String>> changedSessionVar =
VariableMgr.dumpChangedVars(context.getSessionVariable());
profile.setChangedSessionVar(DebugUtil.prettyPrintChangedSessionVar(changedSessionVar));
}
@@ -916,6 +917,12 @@ public class StmtExecutor {
return false;
}
+ // If the query is short circuit, we should not update the profile,
+ // which will impact the performance of the short circuit query.
+ if (statementContext.isShortCircuitQuery()) {
+ return false;
+ }
+
LogicalPlan plan = ((LogicalPlanAdapter) parsedStmt).getLogicalPlan();
if (plan instanceof InsertIntoTableCommand) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]