Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b5554878
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b5554878
编写于
12月 02, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-2293]<enhance>: improve projection query performance for super table.
上级
43a3f513
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
217 addition
and
119 deletion
+217
-119
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+4
-3
src/query/inc/qExecutor.h
src/query/inc/qExecutor.h
+3
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+207
-111
src/query/src/qUtil.c
src/query/src/qUtil.c
+0
-2
src/util/src/hash.c
src/util/src/hash.c
+3
-2
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
b5554878
...
...
@@ -5311,9 +5311,10 @@ int32_t parseLimitClause(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t clauseIn
if
(
tscOrderedProjectionQueryOnSTable
(
pQueryInfo
,
0
))
{
/*
* the limitation/offset value should be removed during retrieve data from virtual node,
* since the global order are done in client side, so the limitation should also
* be done at the client side.
* the offset value should be removed during retrieve data from virtual node, since the
* global order are done in client side, so the offset is applied at the client side
* However, note that the maximum allowed number of result for each table should be less
* than or equal to the value of limit.
*/
if
(
pQueryInfo
->
limit
.
limit
>
0
)
{
pQueryInfo
->
limit
.
limit
=
-
1
;
...
...
src/query/inc/qExecutor.h
浏览文件 @
b5554878
...
...
@@ -190,6 +190,7 @@ typedef struct SQueryRuntimeEnv {
bool
groupbyNormalCol
;
// denote if this is a groupby normal column query
bool
hasTagResults
;
// if there are tag values in final result or not
bool
timeWindowInterpo
;
// if the time window start/end required interpolation
bool
queryWindowIdentical
;
// all query time windows are identical for all tables in one group
int32_t
interBufSize
;
// intermediate buffer sizse
int32_t
prevGroupId
;
// previous executed group id
SDiskbasedResultBuf
*
pResultBuf
;
// query result buffer based on blocked-wised disk file
...
...
@@ -217,7 +218,8 @@ typedef struct SQInfo {
STableGroupInfo
tableGroupInfo
;
// table <tid, last_key> list SArray<STableKeyInfo>
STableGroupInfo
tableqinfoGroupInfo
;
// this is a group array list, including SArray<STableQueryInfo*> structure
SQueryRuntimeEnv
runtimeEnv
;
SArray
*
arrTableIdInfo
;
// SArray* arrTableIdInfo;
SHashObj
*
arrTableIdInfo
;
int32_t
groupIndex
;
/*
...
...
src/query/src/qExecutor.c
浏览文件 @
b5554878
此差异已折叠。
点击以展开。
src/query/src/qUtil.c
浏览文件 @
b5554878
...
...
@@ -83,8 +83,6 @@ void resetTimeWindowInfo(SQueryRuntimeEnv *pRuntimeEnv, SWindowResInfo *pWindowR
return
;
}
// assert(pWindowResInfo->size == 1);
for
(
int32_t
i
=
0
;
i
<
pWindowResInfo
->
size
;
++
i
)
{
SResultRow
*
pWindowRes
=
pWindowResInfo
->
pResult
[
i
];
clearResultRow
(
pRuntimeEnv
,
pWindowRes
,
pWindowResInfo
->
type
);
...
...
src/util/src/hash.c
浏览文件 @
b5554878
...
...
@@ -151,8 +151,9 @@ static void pushfrontNodeInEntryList(SHashEntry *pEntry, SHashNode *pNode);
*/
SHashObj
*
taosHashInit
(
size_t
capacity
,
_hash_fn_t
fn
,
bool
update
,
SHashLockTypeE
type
)
{
if
(
capacity
==
0
||
fn
==
NULL
)
{
return
NULL
;
assert
(
fn
!=
NULL
);
if
(
capacity
==
0
)
{
capacity
=
4
;
}
SHashObj
*
pHashObj
=
(
SHashObj
*
)
calloc
(
1
,
sizeof
(
SHashObj
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录