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

Prune main table in entity splitting if not used #29113

Open
smitpatel opened this issue Sep 15, 2022 · 2 comments
Open

Prune main table in entity splitting if not used #29113

smitpatel opened this issue Sep 15, 2022 · 2 comments

Comments

@smitpatel
Copy link
Contributor

smitpatel commented Sep 15, 2022

Considerations

From implementation perspective,
Multiple columns coming from different fragment mapped to same IProperty will have same value. Currently we pick the first column in that list (which is like to be coming from main table which we don't remove yet). In order to prune in best way, we would need to understand at the time of pruning what are the column values we need and how to generate those columns by utilizing least number of tables participating in the entity splitting. #29035 may be necessary for it.

@n0099
Copy link

n0099 commented Jan 12, 2023

Is there any plan for implementing this feature?

@ajcvickers
Copy link
Member

This issue is in the Backlog milestone. This means that it is not planned for the next release (EF Core 8.0). We will re-assess the backlog following the this release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources. Make sure to vote (👍) for this issue if it is important to you.

n0099 added a commit to n0099/open-tbm that referenced this issue Jan 12, 2023
…ne` relationships instead of desired `one-zeroOrOne`(optional entity), leading to inserting many records with all fields except the primary key with NULL values as placeholder record for `one-one` relation, so without re-introducing something like `IRevision.NullFieldsBitMask`, we can't distinguish between the original literal NULL value and these empty records: dotnet/efcore#27974 dotnet/efcore#29113 @ `TbmDbContext.OnModelCreating()`

+ abstract class `RevisionWithSplitting` as base class of all derived classes of `IRevision`
* insert all entities returned from `RevisionWithSplitting.GetSplitEntities()` into DB @ `CommonInSavers.SavePostsOrUsers()`
* change `abstract class BaseRevision` to `interface IRevision` to comply with single inheritance
@ crawler
n0099 added a commit to n0099/open-tbm that referenced this issue Jan 12, 2023
…ne` relationships instead of desired `one-zeroOrOne`(optional entity), leading to inserting many records with all fields except the primary key with NULL values as placeholder record for `one-one` relation, so without re-introducing something like `IRevision.NullFieldsBitMask`, we can't distinguish between the original literal NULL value and these empty records: dotnet/efcore#27974 dotnet/efcore#29113 @ `TbmDbContext.OnModelCreating()`

+ abstract class `RevisionWithSplitting` as base class of all derived classes of `IRevision`
* insert all entities returned from `RevisionWithSplitting.GetSplitEntities()` into DB @ `CommonInSavers.SavePostsOrUsers()`
* change `abstract class BaseRevision` to `interface IRevision` to comply with single inheritance
@ crawler
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

4 participants