Hi
Excuse me.
If I use the hash sharding method and specify the id as the primary key,as shown in the following example: CREATE TABLE tracking (id int PRIMARY KEY)
What method can I use to place records with ids such as 10,11,12,13 in the same tablet ?
Can I use split into? For example: CREATE TABLE tracking (id int PRIMARY KEY) split into 1 tablet
Yes, it’s a good idea.
However, I hope that the processing method of hash sharding also supports placing specified data in the same table tablet.
Do you have any good suggestions?
Thanks.
Hi @dorian_yugabyte
Excuse me.
I can’t follow you, sorry.
Are k1 and k2 two column fields?
Is the partition_key a combination of k1 and k2 ?
Is this id field a normal column?
Is this the correct table creation statement as follow ? CREATE TABLE(k1 int,k2 int,id int,PRIMARY KEY(k1,k2));
Hi @dorian_yugabyte
I’m sorry to trouble you.
The data is written to the data table according to the algorithm corresponding to hash-sharing.
What tools do we have to quickly calculate the hash value of the partition_key?
I want to see how a data record calculates the hash value of the partition_key and writes it to which tablet.
Thank you very much.