-
Notifications
You must be signed in to change notification settings - Fork 4.8k
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
相同结果集 子表查询和超级表查询效率有明显差距 #27938
Labels
Comments
Miracle1003
added
help wanted
Extra attention is needed
question
Further information is requested
labels
Sep 18, 2024
子表才是存储数据的实体,如果通过超级表查询,需要检索到子表然后返回数据。因此本来就多出一层筛选,有性能损耗是正常的。 |
如果超级表或者子表数据量增加,是否会导致执行时间差距变大 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
通过子表查询:
select * from temp_12408 where ts > '2024-09-01 00:00:00' order by ts desc;
执行时间在0.2s左右
通过超级表查询:
select * from vibration_ts where sensor_id = 12408 and data_type = 'temp' and ts > '2024-09-01 00:00:00' order by ts desc;
执行时间在0.5s左右
如果有数据碎片,超级表查询的执行时间还会被无限拉长。
这种现象是语句问题还是本身设计如此?
The text was updated successfully, but these errors were encountered: