title: How does fetching data from SQL Server to SqlDataReader work?
body: <p>When I call this code:</p>
  
  <pre><code>using (var connection = new SqlConnection(connectionString))
  {
      var command = new SqlCommand("SELECT * FROM Table", connection);
      connection.Open();
      using (var reader = command.ExecuteReader())
      {
          while(reader.Read())
          {
              // Do something here
          }
      }
  }
  </code></pre>
  
  <p>what happens internally? How does this work on a network level? Will it make a new round trip to database for each call to <code>Read</code> or is there any batch read implemented internally?</p>
  
  <p>I'm asking because I just read that ODP.NET provides <code>FetchSize</code> property in both <code>OracleCommand</code> and <code>OracleDataReader</code> which I understand as definition of how many records should be preloaded by single round trip to the database. I wonder if SQL Server works in similar fashion and if there is some similar behavior which can be configured somewhere. I didn't find any such configuration in <code>SqlCommand</code>, <code>SqlDataReader</code> or <code>CommandBehavior</code>.</p>