TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

Discussion on the efficiency of total aggregation query of super table under large amount of data

Open duanfeixiang opened this issue 6 years ago • 2 comments

Performance Issue 大数据量下,超级表聚合查询的效率探讨


Problem Description 一个用户一张表,目标用户1亿,假设平均给每个用户每天存入10条数据。想了解下超级表中where筛选和group by的性能怎么样?筛选条件作用在TAG字段和非TAG字段上性能差异又有多大?


To Reproduce

  1. Database parameters used: 数据库参数: keep: 365 days:30 blocks:4

    precision:us
    表结构:
    describe database_operation;
    Field
    ##########################
    operation_time
    operation_log_id
    operation_domain
    operation_type
    operation_desc
    operation_biz_no
    operation_result
    operation_detail
    operation_alarm
    operation_data_washer
    operator_name
    operator_id
    Query OK, 12 row(s) in set (0.002116s)
  2. Verbs used: Insert/Import/Select? (1)Insert我理解还好,每次插入对应的用户子表中,据我了解,tdengine根据时间戳单项追加插入,对用户使用上做了一些牺牲来提升写入性能。 (2)主要是select,超级表这么大数据量的情况下,根据普通字段条件过滤、group by查询的效率如何?对于TAG字段效率又如何(根据TAG其实能拼接出子表名称的话,直接查询子表性能是否还不错?),提这个issue主要是想探讨下这个问题。

  3. Describe the total amount of data 一个用户一张表,目标用户1亿,假设平均给每个用户每天存入10条数据。

  4. Observed performance vs. expected performance 请问理论分析上TDengine是否能够支撑这么大的数据量?

  5. 机器配置 系统内核版本: 3.10.0-1127.13.1.el7.x86_64 CPU生厂商: Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz CPU核心数: 8 总内存: 31490M TDengine Server Version: 2.0.5.1

duanfeixiang avatar Oct 29 '20 04:10 duanfeixiang

  1. 从理论上讲, 直接查子表能快点,不过通过tag过滤的损耗其实很小很小, 所以通过tag过滤找到子表,然后进行查询能和直接查子表其实差别不是很大。
  2. 普通字段条件, group by的效率能最好自己做实验验证下,毕竟机器不同,设置不同,可能得到的结果差异比较大

yihaoDeng avatar Oct 30 '20 06:10 yihaoDeng

This issue is stale because it has been open for 30 days with no activity.

yihaoDeng avatar Apr 19 '22 00:04 yihaoDeng