dotnet / dotnet/efcore

SplitQuery per-table definition

Open
#29,089 6 comments 10 reactions 0 assignees View on GitHub
area-query customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

Currently (AFAIK) it's only possible to either have SingleQuery or SplitQuery defined globally for all queries, or per-query.
Would have been really helpful being able to set the default split query mode per table.
Consider a blogs -> posts relation, our blog has a logo column with max 4MB of data per row.
Joining the blog with its 10K posts can be devastating.

I think it should also be possible to set the mode by entity:

```
public class BlogConfiguration IEntityTypeConfiguration
{
public void Configure(EntityTypeBuilder builder)
{
builder.Property(entity => entity.Logo).HasMaxLength(1024 * 1024 * 4);
builder.WithSplitQuery(true);
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.