I was doing some benchmarking, so I had a SQL database with 2500 records. I inserted those records into DocumentDB.
I wrote two lines of code, one with entity framework to pull all 2500 into an array in C#. The next line to pull all 2500 into an array from DocuementDB.
Code used:
var test= await Task<Test>.Run(() =>
client.CreateDocumentQuery<Test>(collection.DocumentsLink)
.ToList());
The DocumentDB example took over 20 seconds. The SQL Server line was near instant. The objects are simple DTO with 5 properties, and I did the SQL Query over the internet.
Am I misusing DocumentDB? I thought it was made to pull all your records into memory then join with linq.