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 sub parititioning #20648

Open
Dieken opened this issue Oct 26, 2020 · 1 comment
Open

support sub parititioning #20648

Dieken opened this issue Oct 26, 2020 · 1 comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. feature/accepted This feature request is accepted by product managers type/feature-request This is a feature requests on the product

Comments

@Dieken
Copy link

Dieken commented Oct 26, 2020

Feature Request

Describe the feature you'd like:

https://dev.mysql.com/doc/refman/5.7/en/partitioning-subpartitions.html

I have a table like (account_id, transaction_date, order_id, amount, price, confirm_info), I would like to partition it by transaction_date with monthly range partitioning, then subpartition it by account_id with hash partitioning.

The online service queries the table by account_id = xxxx, this is why I put account_id at the beginning.

But the offline batch job processes the table by transaction-date >= 'yyyy-mm-dd' and fill confirm_info, I don't want to add an extra index for transaction_date because that would slow down TiSpark batch write. If TiDB supports subpartitioning, then the batch job can do partition pruning, not have to do a full table scan.

Describe alternatives you've considered:

Without subpartitioning, I have to add a fine-grained index, this slow down batch write, it's a pity TiDB doesn't support coarse-grained index like BRIN in PostgreSQL: https://www.postgresql.org/docs/current/brin-intro.html

Teachability, Documentation, Adoption, Migration Strategy:

The MySQL manual is enough.

@Dieken Dieken added the type/feature-request This is a feature requests on the product label Oct 26, 2020
@ghost ghost added this to Need Triage in Feature Request Kanban via automation Oct 27, 2020
@zz-jason zz-jason added the feature/accepted This feature request is accepted by product managers label Apr 24, 2021
@zz-jason zz-jason moved this from Need Triage to Accepted in Feature Request Kanban Apr 24, 2021
@qw4990 qw4990 added this to Backlogs in Partition Table Apr 27, 2021
@mjonss
Copy link
Contributor

mjonss commented Feb 14, 2022

/component tablepartition

@ti-chi-bot ti-chi-bot added the component/tablepartition This issue is related to Table Partition of TiDB. label Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. feature/accepted This feature request is accepted by product managers type/feature-request This is a feature requests on the product
Projects
Partition Table
  
Backlogs
Development

No branches or pull requests

4 participants