数据库选哪个?
#128
Replies: 5 comments
-
|
选timescaledb |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
选questdb |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
换questdb,写入好很多,单线程读取也略优于TimeScaledb |
Beta Was this translation helpful? Give feedback.
0 replies
-
BANBOT_DUCKDB_DSN=temp \
BANBOT_TIMESCALE_URL='postgres://...' \
BANBOT_DOLPHIN_URL='dolphindb://...' \
BANBOT_QUESTDB_PG_URL='postgres://admin:quest@127.0.0.1:8812/qdb?sslmode=disable' \
BANBOT_QUESTDB_ILP_CONF='http::addr=127.0.0.1:9000;username=admin;password=quest;' \
BANBOT_TDENGINE_DSN='root:taosdata@ws(127.0.0.1:6041)/' \
go test -count=1 -tags duckdb ./bench/tsdbbench -run TestTSDBPerfReport -v上面是测试代码和启动命令。duckdb使用文件而非内存。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
目前用的timescaledb,当前痛点是:原生安装略复杂;压缩率不高(已解决)
下面针对timescaledb,questdb,dolphindb,tdengine进行了各个场景性能测试:
read_3000:一次读3000个K线
read_20000:一次读20000个K线
write_batch_1000:一次写入1000个K线
write_one:一次写入一个K线
concurrent_read_3000:5线程并发一次读3000个K线
....
最重要的场景是concurrent_read_3000 read_3000 concurrent_write_batch_1000 write_batch_1000
结果如下:

首先排除dolphindb,在并发读写时性能最差。
其次排除tdengine,它写入性能最好,但读取差。
questdb在3000个K线级别,单线程性能是timescaledb的1.5倍,多线程性能是tsdb的65%
之前考虑弃用timescaledb也有原因是它磁盘占用大,不过刚发现是之前一直没有启用数据压缩,以为压缩后对性能影响很大,刚才测试发现压缩后性能反而提升了20%~100%;压缩率为90%~95%也够。
上面仅代表了banbot中最常见场景的性能测试,并未测试海量数据读写等场景。
questdb优点是可以做到自动化安装,解决了timescaledb原生安全繁琐问题。
目前看timescaledb好像除了原生安装麻烦,没什么别的缺点,大家看还有必要改数据库么?直接在对应选项点赞,有其他想法可直接评论。
Beta Was this translation helpful? Give feedback.
All reactions