long oldcompositeIndexUsed = profiler.getCounter("db.demo.query.compositeIndexUsed");
OClass klazz = database.getMetadata().getSchema().getOrCreateClass("CountFunctionWithUniqueIndexTest");
if (!klazz.existsProperty("a")) {
klazz.createProperty("a", OType.STRING);
klazz.createIndex("testCountFunctionWithUniqueIndex", "NOTUNIQUE", "a");
}
database.newInstance("CountFunctionWithUniqueIndexTest").field("a", "a").field("b", "c").save();
database.newInstance("CountFunctionWithUniqueIndexTest").field("a", "a").field("b", "c").save();
database.newInstance("CountFunctionWithUniqueIndexTest").field("a", "a").field("b", "e").save();