Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a39e6f7d
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a39e6f7d
编写于
8月 29, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: super table scan requires project operator to merge packets to improve performance
上级
2ad31384
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
5 deletion
+12
-5
source/client/inc/clientInt.h
source/client/inc/clientInt.h
+1
-0
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+3
-2
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+2
-0
source/libs/planner/src/planOptimizer.c
source/libs/planner/src/planOptimizer.c
+4
-1
source/libs/planner/test/planTestUtil.cpp
source/libs/planner/test/planTestUtil.cpp
+2
-2
未找到文件。
source/client/inc/clientInt.h
浏览文件 @
a39e6f7d
...
...
@@ -101,6 +101,7 @@ typedef struct SQueryExecMetric {
int64_t
ctgStart
;
// start to parse, us
int64_t
ctgEnd
;
// end to parse, us
int64_t
semanticEnd
;
int64_t
planEnd
;
int64_t
execEnd
;
int64_t
send
;
// start to send to server, us
int64_t
rsp
;
// receive response from server, us
...
...
source/client/src/clientEnv.c
浏览文件 @
a39e6f7d
...
...
@@ -83,11 +83,12 @@ static void deregisterRequest(SRequestObj *pRequest) {
pRequest
->
metric
.
execEnd
-
pRequest
->
metric
.
semanticEnd
);
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
insertElapsedTime
,
duration
);
}
else
if
(
QUERY_NODE_SELECT_STMT
==
pRequest
->
stmtType
)
{
tscPerf
(
"select duration %"
PRId64
"us: syntax:%"
PRId64
"us, ctg:%"
PRId64
"us, semantic:%"
PRId64
"us, exec:%"
PRId64
"us"
,
tscPerf
(
"select duration %"
PRId64
"us: syntax:%"
PRId64
"us, ctg:%"
PRId64
"us, semantic:%"
PRId64
"us,
planner:%"
PRId64
"us,
exec:%"
PRId64
"us"
,
duration
,
pRequest
->
metric
.
syntaxEnd
-
pRequest
->
metric
.
syntaxStart
,
pRequest
->
metric
.
ctgEnd
-
pRequest
->
metric
.
ctgStart
,
pRequest
->
metric
.
semanticEnd
-
pRequest
->
metric
.
ctgEnd
,
pRequest
->
metric
.
execEnd
-
pRequest
->
metric
.
semanticEnd
);
pRequest
->
metric
.
planEnd
-
pRequest
->
metric
.
semanticEnd
,
nowUs
-
pRequest
->
metric
.
semanticEnd
);
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
queryElapsedTime
,
duration
);
}
...
...
source/client/src/clientImpl.c
浏览文件 @
a39e6f7d
...
...
@@ -1030,6 +1030,8 @@ void launchAsyncQuery(SRequestObj* pRequest, SQuery* pQuery, SMetaData* pResultM
pRequest
->
body
.
subplanNum
=
pDag
->
numOfSubplans
;
}
pRequest
->
metric
.
planEnd
=
taosGetTimestampUs
();
if
(
TSDB_CODE_SUCCESS
==
code
&&
!
pRequest
->
validateOnly
)
{
SArray
*
pNodeList
=
NULL
;
buildAsyncExecNodeList
(
pRequest
,
&
pNodeList
,
pMnodeList
,
pResultMeta
);
...
...
source/libs/planner/src/planOptimizer.c
浏览文件 @
a39e6f7d
...
...
@@ -1665,7 +1665,10 @@ static bool eliminateProjOptMayBeOptimized(SLogicNode* pNode) {
return
false
;
}
if
(
QUERY_NODE_LOGIC_PLAN_PROJECT
!=
nodeType
(
pNode
)
||
1
!=
LIST_LENGTH
(
pNode
->
pChildren
))
{
// Super table scan requires project operator to merge packets to improve performance.
if
(
QUERY_NODE_LOGIC_PLAN_PROJECT
!=
nodeType
(
pNode
)
||
1
!=
LIST_LENGTH
(
pNode
->
pChildren
)
||
(
QUERY_NODE_LOGIC_PLAN_SCAN
==
nodeType
(
nodesListGetNode
(
pNode
->
pChildren
,
0
))
&&
TSDB_SUPER_TABLE
==
((
SScanLogicNode
*
)
nodesListGetNode
(
pNode
->
pChildren
,
0
))
->
tableType
))
{
return
false
;
}
...
...
source/libs/planner/test/planTestUtil.cpp
浏览文件 @
a39e6f7d
...
...
@@ -278,12 +278,12 @@ class PlannerTestBaseImpl {
}
void
dump
(
DumpModule
module
)
{
cout
<<
"========================================== "
<<
sqlNo_
<<
" sql : ["
<<
stmtEnv_
.
sql_
<<
"]"
<<
endl
;
if
(
DUMP_MODULE_NOTHING
==
module
)
{
return
;
}
cout
<<
"========================================== "
<<
sqlNo_
<<
" sql : ["
<<
stmtEnv_
.
sql_
<<
"]"
<<
endl
;
if
(
DUMP_MODULE_ALL
==
module
||
DUMP_MODULE_PARSER
==
module
)
{
if
(
res_
.
prepareAst_
.
empty
())
{
cout
<<
"+++++++++++++++++++++syntax tree : "
<<
endl
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录