Question : Does ExecuteReaderAsync() load result set progressively? #1025
-
Suppose using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The method returns as soon as the MySQL Server sends the "result set header" (which includes the list of columns included in the results) and before any rows have been read from the network. Rows are only read from the network connection when you call The other variable here is whether the MySQL Server "streams" the data to the client, or whether it first computes the whole million-row result set in memory and then writes it to the client. If the latter, it can seem like (And technically, |
Beta Was this translation helpful? Give feedback.
The method returns as soon as the MySQL Server sends the "result set header" (which includes the list of columns included in the results) and before any rows have been read from the network. Rows are only read from the network connection when you call
ReadAsync
andNextResultAsync
; it's not all read ahead of time and buffered in memory.The other variable here is whether the MySQL Server "streams" the data to the client, or whether it first computes the whole million-row result set in memory and then writes it to the client. If the latter, it can seem like
ExecuteReaderAsync
"waits" until all the rows are available, but it's just dependent on when MySQL Server actually sends the data.(An…