(Maybe I'm doing something wrong, but) I get terrible reading performance from RavenDB!
This is my document:
public class Location { public Guid Id { get; set; } public string Description { get; set; } public string DescriptionFa { get; set; } public double Longitude { get; set; } public double Latitude { get; set; } }
And this is my code:
using (var session = documentStore.OpenSession()) { session.Advanced.MaxNumberOfRequestsPerSession = int.MaxValue; var page = 1024; var pageCount = 0; while (true) { var q = session.Query<Location>().OrderBy(l => l.Id).Skip(pageCount * page).Take(page).ToList(); pageCount++; readCount += q.Count; if (q.Count < page) { break; } } }
I have 2,100,000 documents of this kind in the database. There is a spatial index for longitude and latitude. I want to read them all and export to a text file.
source share