There is a project for the table partition feature.
In fact, "partition by range" is nearly done, but it's regretful that the progress was traced in our inner project management tools.
Now, it's time for "partition by hash", and this issue is fired to discuss & trace the progress, in a collaborative way.
insert and replace for hash partitioned table](https://github.com/pingcap/tidb/issues/8377)select for hash partitioned table](https://github.com/pingcap/tidb/issues/8382)delete for hash partitioned table](https://github.com/pingcap/tidb/issues/8380)update for hash partitioned tableMost of those are trivial. For example, implement insert needs to change partitionedTable.AddRecord, the locatePartiiotn() function should adapt to hash partition. Partition prunning probably can't work on "partition by hash", so implement select just change the DataSource to UnionAll.
@tiancaiamao Good job!
One suggestion: It is better to create a separate issue for each subtask and link them here.
Is there any public design doc of partition feature of TiDB?
Is it compatible with MySQL's partition syntax? especially syntax for partition management, eg Add, Drop, Reorganize...
Any new feature that TiDB's partition supports while MySQL does not?
Does partition support namespace(Although I heard that namespace is deprecated in TiDB?)
Is there any public design doc of partition feature of TiDB?
There should be a design proposal, I'll push one later.
Is it compatible with MySQL's partition syntax? especially syntax for partition management, eg Add, Drop, Reorganize...
The partition syntax should be totally compatible with MySQL, while there are some limitations.
Reorganize partition involving data move is not supported under current non-block DDL implementation.
Any new feature that TiDB's partition supports while MySQL does not?
It depends. We plan to do it step by step, "partition by range" first, then "partition by hash"...
Currently no new feature that TiDB's partition supports while MySQL does not was introduced.
Does partition support namespace(Although I heard that namespace is deprecated in TiDB?)
No. There is no plan for namespace now.
@Darren
i want to do this "Drop index operation on hash partitioned table"
I want to take the "Implement insert and replace for hash partitioned table"
I want to do this "Implement select for hash partitioned table"
Is there a task to colocate partitions from different tables together so you can have single-partition transactions over multiple tables if they share partition-keys ?
Hi, here
I've create a issue https://github.com/pingcap/tidb/issues/8378, just have a try! @laidahe
Insert and replace https://github.com/pingcap/tidb/issues/8377 is similar to update, you can modify the UpdateRecord function for PartitionedTable @dreamquster
https://github.com/pingcap/tidb/issues/8382 maybe a bit more hard core, take a look first first, if you find it difficult for you, feel free to pick up some other tasks. @hhxcc
If you meet any problems, let's discuss in the related issue comments.
We focus primary on MySQL compatibility, not clever tricks in NoSQL discussed there https://github.com/pingcap/tidb/issues/7392 @ddorian
I want to Implement update for hash partitioned table.
BTW, Maybe there is nothing need todo for add index, drop index, drop table for hash table, because range partition's code is compatible with hash table.
@laidahe
We can still add more tests to verify it works @crazycs520
@tiancaiamao thank you, I would like to have a try. please guide me when I meet some problems~
Alter table truncate partition is done https://github.com/pingcap/tidb/pull/8624
Most helpful comment
I want to take the "Implement insert and replace for hash partitioned table"