I am trying db4o and I have poor performance when using linq for db4o. (using 7.12)
Here is my configuration:
var configuration = Db4oFactory.Configure();
configuration.ObjectClass(typeof(MyTest)).ObjectField("MyInt").Indexed(true);
Here is the object I'm trying to save:
public class MyTest
{
public int MyInt;
}
And here is my code using linq to db4o (response time 650 ms):
var test = (from c in repo.ObjectContainer.Query<MyTest>()
where c.MyInt == 6500
select c).FirstOrDefault();
And the same request using the built-in API (response time 28 ms):
var query = repo.ObjectContainer.Query();
query.Descend("MyTest");
query.Descend("MyInt").Constrain(6500)
Can someone tell me what happened with linq for db4o?
thanks
source
share