ra0o0f / arangoclient.net

ArangoDB .NET Client with LINQ support
Apache License 2.0
99 stars 37 forks source link

Using LINQ query with Where performance #123

Closed guz-crypto closed 5 years ago

guz-crypto commented 5 years ago

Hi,

I'm trying ArangoDB.Client. I'm a newbie using ArangoDn but I use MongoDB for mayu years.

I'm doing some perfs tests now.

I got a 1 000 000 documents collection. Using db.All to get all the doc takes the same time as querying some of them (2400) using a Where.

I saw that get 2400 documents (very small) took the same amount of memory (6GBytes !!!).

Could you help me ?

Regards.

guz-crypto commented 5 years ago

Ok after a long review, my code was incorrect.

I pass my expression to a function which do the Where, but I pass a Func and I replaced it with a Expression<Func>.

My mistake was that so the Where called was the pure Linq one and not the Queryable one. So my query got all document and then my code do the where clause.

Regards.