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

怎么没有自定义分片函数? #11

Open
zhong2312 opened this issue May 25, 2023 · 0 comments
Open

怎么没有自定义分片函数? #11

zhong2312 opened this issue May 25, 2023 · 0 comments

Comments

@zhong2312
Copy link

比如内容表和内容评论表,因为热门内容评论多,冷门热门评论少,如果按照内容ID去拆分评论表,那么数据容易不均匀。因此希望能够自定义分片函数。比如每个内容的最新1万条评论按照内容ID分片存储。1万条之后的内容移到冷数据存储,由于不是固定的分片规则,所以需要在内容表加一个记录该内容对应的评论所在的冷库分片的位置。查询的时候,如果是查询1万条后的评论则先根据内容ID查分片位置再查评论数据。
虽然后面的自定义分片及查询可以通过代码实现,但还是想了解一下在polardbx里能否通过配置实现。

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

1 participant