How does TiDB creates a new region for each table? #66427
Replies: 2 comments
-
|
原帖作者:winkyao I don’t think you can do that. You can’t control the region in that way. The only thing you can do is to use pdctl to manually split the region PD Control User Guide | PingCAP Docs
Or use split region statement to control the regions in a Table. Split Region | PingCAP Docs |
Beta Was this translation helpful? Give feedback.
-
|
原帖作者:harpocrates Okay, I think we’re saying the same thing, so I can mimic what TiDB is doing. I see that on table creation it ensures that the region that is supposed to host the data for that new table is split using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
原帖作者:harpocrates
原帖时间:2023-03-05 05:41:25.600925
原帖ID/Slug:440 / how-does-tidb-creates-a-new-region-for-each-table
I wanna use TiKV for a project but I’d like to know how TiDB ensures that each table it creates in TiKV is associated to a specific region ?
TiDB’s documentation says
The
split-tableconfiguration option is enabled by default. When it is enabled, a separate Region is created for each newly created tableHow can I guarantee that when I create a certain predicate like /peterpetrelli/t1/col1/… it ends in a specific region. I would even want everything that starts with /peterpetrelli/ to end up in the same region(s) and not be shared by keys starting with other prefixes. How would I do it with TiKV ?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions