From e7f4755386f19c149dc8569372a75700b1237556 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 10 Aug 2022 20:26:59 +0800 Subject: [PATCH] opti: add log for time cost --- source/libs/executor/src/executil.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 2b2c4cc201..63bd30120e 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -384,6 +384,7 @@ SColumnInfoData* getColInfoResult(void* metaHandle, SArray* pTableList, SNode* p goto end; } + int64_t st = taosGetTimestampUs(); for (int32_t i = 0; i < rows; i++) { STableKeyInfo* info = taosArrayGet(pTableList, i); @@ -411,6 +412,8 @@ SColumnInfoData* getColInfoResult(void* metaHandle, SArray* pTableList, SNode* p } metaReaderClear(&mr); } + int64_t st1 = taosGetTimestampUs(); + qDebug("generate tag block rows:%d, cost:%lf ms", rows, st1-st); pBlockList = taosArrayInit(2, POINTER_BYTES); taosArrayPush(pBlockList, &pResBlock); @@ -425,6 +428,8 @@ SColumnInfoData* getColInfoResult(void* metaHandle, SArray* pTableList, SNode* p if(code != TSDB_CODE_SUCCESS){ terrno = code; } + int64_t st2 = taosGetTimestampUs(); + qDebug("calculate tag block rows:%d, cost:%lf ms", rows, st2-st1); end: taosArrayDestroy(pBlockList);