Closed
Description
Using the System.Linq.Async NuGet Package.
var query = "SELECT * FROM table";
var cnn = ...
var firstRecord = await cnn.QueryUnbufferedAsync<type>(query).FirstAsync();
cnn.close();
If "table" has millions of rows this is slow. IAsyncEnumerable is designed to be more efficient, at least from a memory point of view. But when calling FirstAsync you would expect it to run quickly as each row is returned to the calling code when it is read.
The reader is being disposed without cancelling the command first. I did look at using ExecuteReaderAsync but I can't get access to the command.
Metadata
Metadata
Assignees
Labels
No labels