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

Add Partitioning Feature to MySQL #1825

Open
vkoori opened this issue Jan 2, 2024 · 2 comments
Open

Add Partitioning Feature to MySQL #1825

vkoori opened this issue Jan 2, 2024 · 2 comments
Assignees
Milestone

Comments

@vkoori
Copy link

vkoori commented Jan 2, 2024

Description

I would like to propose adding a partitioning feature to MySQL. Partitioning allows for better organization and management of large tables by dividing them into smaller, more manageable pieces. This can greatly improve performance and query efficiency.

Official Reference

For more information on partitioning in MySQL, please refer to the official documentation here.

@lauxjpn
Copy link
Collaborator

lauxjpn commented Mar 1, 2024

There seems to be a lot of specialized syntax involved, so I am not sure if we want to spend the time to implement it in all its glory at this point in time.

Currently, you would need to craft and execute your own ALTER TABLE statement to handle partitions when using Pomelo.

We could add a generic .PartitionBy(string partitionOptions) extension method to use on an entity type in DbContext.OnModelCreating(). But it would really just add a PARTITION BY clause plus the supplied partitionOptions string. So I am not sure, how much value that would actually bring over what you can do already at the moment with a hand-crafted ALTER TABLE statement.

@vkoori Any thoughts?

@lauxjpn lauxjpn self-assigned this Mar 1, 2024
@roji
Copy link

roji commented Mar 1, 2024

See related conversation for the PostgreSQL side. FWIW I'm also generally skeptical about going into a big effort to model complex DDL stuff, where users can add e.g. ALTER TABLE manually into their migrations - EF providers really can't be expected to cover everything. In the case of partitioning specifically, I do think I've maybe received enough votes to consider at least a subset of the syntax, but we'll see whether I actually get around to devoting the time...

@lauxjpn lauxjpn added this to the Backlog milestone Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants