Skip to content

dble使用MySQL-Offset方式的全局序列后为什么insert性能差? #2945

Answered by PanternBao
PanternBao asked this question in Q&A
Discussion options

You must be logged in to vote

MySQL-Offset方式的全局序列详细配置参考:

https://github.com/actiontech/dble-docs-cn/blob/master/1.config_file/1.7_global_sequence/1.7.1_MySQL-offset-setp.md

其中会要求在MySQL的DBLE_SEQUENCE表中insert步长(increment字段)

步长是指:预生成全局序列的数量

上面的例子中步长设置成了1,因此每次insert单value都要和数据库进行交互,自然性能就会比较差;
如果设置成100,dble中就会预取100个全局序列,只有等这个100个用完才重新取。

解决方案:调大步长即可

Replies: 1 comment

Comment options

PanternBao
Nov 5, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by yanhuqing666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant