TDengine
TDengine copied to clipboard
count(*) performance tuning
Performance Issue Any questions related to TDengine's performance can be discussed here.
Problem Description A clear and concise description of what the problem is.
To Reproduce Steps to reproduce the behavior:
- Database parameters used:
Database:
CREATE DATABASE `front_end_metric_31` BUFFER 96 CACHEMODEL 'none' COMP 2 DURATION 14400m WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 KEEP 5256000m,5256000m,5256000m PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 3 STRICT 'off' WAL_LEVEL 2 VGROUPS 2 SINGLE_STABLE 0
- Verbs used: Select?
select count(*) from front_end_metric_31.stb_visit_log;
count(*) |
========================
4290299 |
Query OK, 1 rows in database (40.150812s)
- Describe the total amount of data 4 million
- Observed performance vs. expected performance
blow 10s
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
OS: [Red Hat Enterprise Linux Server release 7.6 ] Memory, CPU, current Disk Space :8C 24G ,500G TDengine Version [3.0.1.0]
可以先换到 3.0.1.4 ,这块做了一些重构
发的什么东西,你电话多少?
苏佳音
@.***
电子名片新出VIP模板啦,快来体验>>
扫一扫,
快速添加名片到手机
------------------ 原始邮件 ------------------
发件人: Qiuzhuang Lian @.***>
发送时间: 2022-11-28 01:30:12
收件人:taosdata/TDengine @.***>
抄送:Subscribed @.***>
主题: Re: [taosdata/TDengine] count(*) performance tuning (Issue #17210)
可以先换到 3.0.1.4 ,这块做了一些重构
如果对表数据进行频繁的更新,结果会导致count 越来越慢。
貌似3.X 更新了update 这部分 - 采用这种机制,删除功能对于写操作变得相对简单了,但是对于查询而言,则变得更加复杂了。查询在合并数据时,要判断记录是不是被删除了,即检查记录是不是在所有的删除区间(矩形)里面,这是相当耗时的。
麻烦帮忙确认下,谢谢。
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>