Hello,
I found something which is very strange.
I have a graph with 100 000 nodes where a node has a property "age".
If i want to update the property "age" of 50 nodes with the Java API
Node node;
ArrayList<Node> toUpdate=new ArrayList<Node
time1=System.nanoTime();
try (Transaction tx = graphDb.beginTx()) {
for(int i = 1;i<=50;i++){
node = graphDb.findNode(labelPerson, "name", i);
if(node != null)
toUpdate.add(node);
}
for(int i = 0;i<toDelete1.size();i++){
toUpdate.get(i).setProperty("age", Math.random());
//SOLUTION 1 // generate a double between 0.000000 and 1.0000000
toUpdate.get(i).setProperty("age", String.valueOf(Math.random()));
//SOLUTION 2 // same number but stored as a string
}
tx.success();
}
time2=System.nanoTime();
If I store the random double value as a double, it takes a lot of time to
perform this operation. (201 seconds !!!)
Same issue if it is stored as a float.
However, If I store the same random value but as a String it is
instantaneous.
Any reason why ? Is it related to the internal Lucene Index having issues
with this ?
While inserting the data, I created the index the following way :
public static String propertyAge = "age";
inserter = BatchInserters.inserter(new File(Const.DB_PATH_Neo4J));
inserter.createDeferredSchemaIndex(personLabel).on(propertyAge).create();
I using Neo4J 3.0.0
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.