When I add data to the database, I use a merge something like this:
MERGE (n:Thing { uid : <the uid>}) ON CREATE SET n.prop1  = blah1, n.prop2 
= blah2 ...

Since I'm working in a multi-threaded environment, it's possible to have 
the same node written twice and I've seen many instances where duplicate 
nodes are created. SO
I have an index on the uid.

CREATE CONSTRAINT ON (n:Thing) ASSERT n.uid IS UNIQUE


Before creating the index, those merges were taking 1-50ms, now they take 
20-300ms.  Other operations like adding relationships seem to be taking 
quite a bit longer too.

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to