Open pancodex opened 1 month ago
Bug Description 两个库中均有1个超级表meters,超级表有1万张子表,每张子表10万条数据,共计10亿条数据。 其中test库的meters设置为将所有字段加入sma; `taos> show create table test.meters \G;
1.row Table: meters Create Table: CREATE STABLE meters (ts TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium', current FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium', voltage INT ENCODE 'simple8b' COMPRESS 'lz4' LEVEL 'medium', phase FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium', temperture FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium', humidity FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium') TAGS (groupid TINYINT, location VARCHAR(16)) SMA(current,voltage,phase,temperture,humidity) `
meters
ts
current
voltage
phase
temperture
humidity
groupid
location
test_nosma库的meters建表sql和test库的超表除去sma外完全相同; `taos> show create table test_nosma.meters \G;
1.row Table: meters Create Table: CREATE STABLE meters (ts TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium', current FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium', voltage INT ENCODE 'simple8b' COMPRESS 'lz4' LEVEL 'medium', phase FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium', temperture FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium', humidity FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium') TAGS (groupid TINYINT, location VARCHAR(16)) `
但实际测试每个字段的最小值、最大值和统计值,都是字段没加入sma的test_nosma库的查询速度最快 test_nosma库的查询速度: test库的查询速度:
甚至加入sma的首次查询去到144秒,这和预期的完全相反。
比较了下vnode里.sma文件的大小,两个库的是基本一致 test_nosma: test:
Expected Behavior 预期应该是test库的预计算更快。 是我的理解有误吗?建表语句这里的sma(column1, column2)实际上是将字段剔除出预计算?
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional Context 部署的3节点集群
我们看一下
您方便加一下微信吗,方便后续联系 a15652223354
Bug Description 两个库中均有1个超级表meters,超级表有1万张子表,每张子表10万条数据,共计10亿条数据。 其中test库的meters设置为将所有字段加入sma; `taos> show create table test.meters \G;
1.row Table: meters Create Table: CREATE STABLE
meters
(ts
TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium',current
FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium',voltage
INT ENCODE 'simple8b' COMPRESS 'lz4' LEVEL 'medium',phase
FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium',temperture
FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium',humidity
FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium') TAGS (groupid
TINYINT,location
VARCHAR(16)) SMA(current
,voltage
,phase
,temperture
,humidity
) `test_nosma库的meters建表sql和test库的超表除去sma外完全相同; `taos> show create table test_nosma.meters \G;
1.row Table: meters Create Table: CREATE STABLE
meters
(ts
TIMESTAMP ENCODE 'delta-i' COMPRESS 'lz4' LEVEL 'medium',current
FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium',voltage
INT ENCODE 'simple8b' COMPRESS 'lz4' LEVEL 'medium',phase
FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium',temperture
FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium',humidity
FLOAT ENCODE 'delta-d' COMPRESS 'lz4' LEVEL 'medium') TAGS (groupid
TINYINT,location
VARCHAR(16)) `但实际测试每个字段的最小值、最大值和统计值,都是字段没加入sma的test_nosma库的查询速度最快 test_nosma库的查询速度:
test库的查询速度:
![image](https://github.com/user-attachments/assets/14ffdd9f-b66c-4de3-980b-f6e148d71b0e)
甚至加入sma的首次查询去到144秒,这和预期的完全相反。
比较了下vnode里.sma文件的大小,两个库的是基本一致 test_nosma:
test:
![image](https://github.com/user-attachments/assets/05251795-23b1-40f5-9802-5fd87c070477)
Expected Behavior 预期应该是test库的预计算更快。 是我的理解有误吗?建表语句这里的sma(column1, column2)实际上是将字段剔除出预计算?
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional Context 部署的3节点集群