title: MongoDB taking lot of time to query large number of records
body: <p>MongoDB is taking lot of time to return 800 records. it takes almost 30-35 seconds. whereas local db with 23,000+ records take 1 seconds. This gives me clue that the issue comes when db is remote.</p>
  
  <p>Looking for help from the community in this area.</p>
  
  <blockquote>
    <p>_database points to IMongoDatabase and mongodb driver for c# is being used for this code.</p>
  </blockquote>
  
  <pre><code>var options = new FindOptions&lt;SomeEntity&gt;
              {
                  Sort = Builders&lt;SomeEntity&gt;.Sort.Descending(x =&gt; x.Id),
                  BatchSize = 1000
              };
  
              var someEntities = await _database
                  .GetCollection&lt;SomeEntity&gt;("SomeEntity")
                  .FindAsync(rule =&gt; true, options).ConfigureAwait(false);
              var list = new List&lt;SomeEntity&gt;();
  
              while (await someEntities.MoveNextAsync())
              {
                  list.AddRange(someEntities.Current.ToList());
              }
  </code></pre>