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

Support for table partition #7907

Closed
11 of 12 tasks
tiancaiamao opened this issue Oct 15, 2018 · 12 comments
Closed
11 of 12 tasks

Support for table partition #7907

tiancaiamao opened this issue Oct 15, 2018 · 12 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@tiancaiamao
Copy link
Contributor

tiancaiamao commented Oct 15, 2018

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.

Most 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 tiancaiamao added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Oct 15, 2018
@tiancaiamao tiancaiamao self-assigned this Oct 15, 2018
@shenli
Copy link
Member

shenli commented Oct 16, 2018

@tiancaiamao Good job!
One suggestion: It is better to create a separate issue for each subtask and link them here.

@darren
Copy link
Contributor

darren commented Oct 16, 2018

Is there any public design doc of partition feature of TiDB?

  1. Is it compatible with MySQL's partition syntax? especially syntax for partition management, eg Add, Drop, Reorganize...

  2. Any new feature that TiDB's partition supports while MySQL does not?

  3. Does partition support namespace(Although I heard that namespace is deprecated in TiDB?)

@tiancaiamao
Copy link
Contributor Author

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

@laidahe
Copy link
Contributor

laidahe commented Oct 19, 2018

i want to do this "Drop index operation on hash partitioned table"

@dreamquster
Copy link
Contributor

I want to take the "Implement insert and replace for hash partitioned table"

@hhu-cc
Copy link
Contributor

hhu-cc commented Nov 7, 2018

I want to do this "Implement select for hash partitioned table"

@ddorian
Copy link

ddorian commented Nov 17, 2018

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 ?

@tiancaiamao
Copy link
Contributor Author

Hi, here
I've create a issue #8378, just have a try! @laidahe
Insert and replace #8377 is similar to update, you can modify the UpdateRecord function for PartitionedTable @dreamquster
#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 #7392 @ddorian

@crazycs520
Copy link
Contributor

crazycs520 commented Nov 21, 2018

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

@tiancaiamao
Copy link
Contributor Author

We can still add more tests to verify it works @crazycs520

@hhu-cc
Copy link
Contributor

hhu-cc commented Nov 22, 2018

@tiancaiamao thank you, I would like to have a try. please guide me when I meet some problems~

@tiancaiamao
Copy link
Contributor Author

Alter table truncate partition is done #8624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

8 participants