Optimize reading a single value from the result set
Open
area-perf
area-query
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
When the query is a `First` or `FirstOrDefault`, then we know that we will only ever read zero or one row from the reader. We might be able to make this more efficient. For example, [CommandBehavior.SingleRow](https://learn.microsoft.com/en-us/dotnet/api/system.data.commandbehavior?view=net-7.0) may help on some providers. In addition, we may be able to make the query execution delegate that we generate more efficient.
Contributor guide
Assessment
This issue has not been assessed yet.