(Maybe I am doing something wrong but) I am getting awful read 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 2100000 documents of this kind in the database. There is a spatial index on Longitude and Latitude. I want to read them all and export them into a text file.
Kaveh,
You are doing over two thousands queries, as well as doing deep paging.
If you want to get all information out, use the smuggler, that is what it is there for, and it is very efficent.