diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 1b2d72d5e1..9d6a69019f 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -8389,6 +8389,7 @@ SQInfo* createQInfoImpl(SQueryTableMsg* pQueryMsg, SGroupbyExpr* pGroupbyExpr, S } pQInfo->qId = qId; + pQInfo->startExecTs = 0; pQInfo->runtimeEnv.pUdfInfo = pUdfInfo; diff --git a/src/query/src/queryMain.c b/src/query/src/queryMain.c index 902fa34722..dd7d77adb0 100644 --- a/src/query/src/queryMain.c +++ b/src/query/src/queryMain.c @@ -273,7 +273,8 @@ bool qTableQuery(qinfo_t qinfo, uint64_t *qId) { } *qId = pQInfo->qId; - pQInfo->startExecTs = taosGetTimestampMs(); + if(pQInfo->startExecTs == 0) + pQInfo->startExecTs = taosGetTimestampMs(); if (isQueryKilled(pQInfo)) { qDebug("QInfo:0x%"PRIx64" it is already killed, abort", pQInfo->qId);