Execute multiple LINQ queries in a single round-trip (aka Expose batching read API to users)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing the existing ADO batch behavior and the LINQ query execution path; the issue names no files or tests. Clarify a user-facing read-batching API, including buffering versus MARS behavior, and distinguish it from internally generated batching in #10878 before defining acceptance tests.
Written by the indexing model from the issue text.
Description
While users can execute multiple updates in a single ADO batch, no such feature currently exists for reading - each query is executed separately. For example, if a single web request requires multiple queries to fulfill (fairly typical case IMHO), then that many database roundtrips have to occur.
Reducing roundtrips can bring a very significant performance boost, so some sort of API which allows a user to defined multiple queries and have them executed together could be useful.
Note that there is a trade-off here: batching typically implies buffering the earlier query results, so the memory overhead is (potentially much) larger than executing different queries and streaming their results; if the results are small, batching makes sense, but if they're huge, multiple queries may make more sense.
The buffering overhead could mitigated by MARS, where supported. In other words, the user-defined "read batch" could actually execute multiple MARS queries (in one roundtrip, if supported), and allow the user to stream the results. Ideally, the user-facing "batching" API shouldn't expose this.
Note: this issue isn't about using batching in internally-generated queries (that's what #10878 is about).
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 134
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/efcore
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
customer-reported
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
area-cosmos area-vector-search
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
area-cosmos
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
area-tools needs-design
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100