Given a database connection via TCP
When I execute following code
Then I see in Task Manager that SQL Server always sends the queried data (when the Reader closes) over the network - even when we do not Read/Fetch them!
var command = new SqlCommand("SELECT TOP 100 Stamp, Blob", connection) { CommandTimeout = commandTimeout };
using (SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleResult | CommandBehavior.CloseConnection)
{
// even if we do not read anything here
//while (reader.Read())
//{
//var values = reader.GetValues();
//if (check condition on values)
// break;
//}
}
Is it normal? What is the cause? Any solutions?
We do not want to download all data returned by the query.