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

Global Index for partitioned tables #45133

Closed
19 of 23 tasks
mjonss opened this issue Jul 3, 2023 · 9 comments
Closed
19 of 23 tasks

Global Index for partitioned tables #45133

mjonss opened this issue Jul 3, 2023 · 9 comments
Assignees
Labels
component/tablepartition This issue is related to Table Partition of TiDB. type/enhancement The issue or PR belongs to an enhancement.

Comments

@mjonss
Copy link
Contributor

mjonss commented Jul 3, 2023

Enhancement

Development tasks for:
Make GLOBAL INDEX General Available

Stage 1 - full implementation, but Experimental

Stage 2 - Stabilise / General Available

Optional / future enhancements

@mjonss mjonss added type/enhancement The issue or PR belongs to an enhancement. component/tablepartition This issue is related to Table Partition of TiDB. labels Jul 3, 2023
@Defined2014
Copy link
Contributor

Defined2014 commented Jul 7, 2023

Maybe support for indexMerge and UnionScan can be added, it seems we are not considering global indexes in those related codes.

Also we need to consider the support of the planner part. Like different cost between global index and local index in some executors.

@311ybb
Copy link

311ybb commented Aug 23, 2023

please make global index General Available faster, we need it !

image

@vonwind
Copy link

vonwind commented Aug 23, 2023

This is an urgently needed feature.

@mjonss
Copy link
Contributor Author

mjonss commented Jun 3, 2024

ADD PARTITION is already supported, it uses the same logic as for TRUNCATE PARTITION, i.e. reading from the Global Index will filter away dropped/added partitions, so it will only show index entries from partitions the transaction/schema version sees. Currently filtered here.

@mjonss
Copy link
Contributor Author

mjonss commented Jul 4, 2024

@Defined2014, for the global index, should there be some way to specify placement rules? I don't think there are any for normal indexes?

@Defined2014
Copy link
Contributor

@Defined2014, for the global index, should there be some way to specify placement rules? I don't think there are any for normal indexes?

I think it will follow table's placement rules and it is in line with my expectations. What do you think @mjonss ? And we could add some test cases for this.

@mjonss
Copy link
Contributor Author

mjonss commented Jul 5, 2024

I think it will follow table's placement rules and it is in line with my expectations. What do you think @mjonss ? And we could add some test cases for this.

@Defined2014 I expect the same, i.e. it will follow the table level's placement rules, so we should probably document it and add a test for it.

@Defined2014
Copy link
Contributor

Defined2014 commented Jul 9, 2024

I think it will follow table's placement rules and it is in line with my expectations. What do you think @mjonss ? And we could add some test cases for this.

@Defined2014 I expect the same, i.e. it will follow the table level's placement rules, so we should probably document it and add a test for it.

I think the exists test cases already covered this situation(by check the key ranges for pd.Rule). And push a doc commit for it.

ti-chi-bot bot pushed a commit that referenced this issue Oct 25, 2024
ti-chi-bot bot pushed a commit that referenced this issue Nov 26, 2024
ti-chi-bot bot pushed a commit that referenced this issue Nov 29, 2024
mjonss added a commit to ti-chi-bot/tidb that referenced this issue Nov 29, 2024
mjonss added a commit to ti-chi-bot/tidb that referenced this issue Nov 29, 2024
ti-chi-bot bot pushed a commit that referenced this issue Nov 29, 2024
ti-chi-bot bot pushed a commit that referenced this issue Dec 13, 2024
@mjonss
Copy link
Contributor Author

mjonss commented Dec 19, 2024

Closing as done, Stage 2 completed. GA in v8.4 and included in LTS release v8.5.
Any future enhancements or issues should be using new Github issues.

@mjonss mjonss closed this as completed Dec 19, 2024
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. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

4 participants