execuse me I interrupted previous post ...
So I checked I have ALL jars in classpath (but in this example it's not necessary - queries are in SODA)
Even I wrote annotations for indexes for Car.pilot and Pilot.points
I checked that indexes are set before open file, e.g one of methods
public static void pointsIndex() {
Db4o.configure().objectClass(Car.class).objectField("pilot").indexed(false);
Db4o.configure().objectClass(Pilot.class).objectField("points").indexed(true);
ObjectContainer db=Db4o.openFile(Util.YAPFILENAME);
try {
Query query = db.query();
query.constrain(Car.class);
query.descend("pilot").descend("points").constrain(new Integer(99));
long t1 = System.currentTimeMillis();
ObjectSet result = query.execute();
long t2 = System.currentTimeMillis();
long diff = t2 - t1;
System.out.println("Test 4: index on points");
System.out.println("Execution time="+diff + " ms");
listResult(result);
}
finally {
db.close();
}
}
What else have I check and change?
I think that example is OK so I have to change configuration..
thank you
Jan Chodura