Skip to content
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

leaf_alloc的biz_tag为主键,频繁页分裂问题 #206

Open
hsfxuebao opened this issue Dec 5, 2022 · 2 comments
Open

leaf_alloc的biz_tag为主键,频繁页分裂问题 #206

hsfxuebao opened this issue Dec 5, 2022 · 2 comments

Comments

@hsfxuebao
Copy link

号段模式下的数据表leaf_alloc,biz_tag为业务区分使用,为varchar(128),但是它也是主键,如果频繁插入可能会出现页分裂情况,建议可以维护一个映射,biz_tag和主键id的映射,查询的时候都以自增id进行查询,性能更高效率更快

@fangqj
Copy link

fangqj commented Dec 19, 2022

增加一个主键id字段,biz_tag建索引

@cixinxc
Copy link

cixinxc commented Dec 30, 2022

自增id做主键。存tag的时候实际存储为 自增主键+biz_tag。

对外屏蔽一下,凡是查biz_tag的时候直接把主键截出来呗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants