Re: [Neo4j] Slow node creation/commits with unique constraint in 2.0.0

2017-05-01 Thread John Begley
Hey Clark,

Thanks for the reply and the links.  I'm not sure I described my issue well 
enough:  I'm using the gender,dob first name nodes as a method of implementing 
the scoring and matching logic.  For clarity I have a person node with 
attributes all self contained, but in addition I'm making a relationship to a 
deliberately separate node for gender etc to act as part of the mechanism of 
matching.

So I'd like to persist with the strategy as it's an elegant and extensible 
solution for matching. But obviously if the performance isn't up to it then I 
have to think again.  So I'm kind of keen to work through the performance 
issues rather than rewrite the application.

I hope that's clearer.

Cheers
John

-- 
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.


Re: [Neo4j] Slow node creation/commits with unique constraint in 2.0.0

2017-05-01 Thread Clark Richey
John,
Generally speaking I don't recommend that you break all of those properties 
down into individual nodes. Taking that approach is pretty much obviating many 
of the benefits of a properties based graph and what you end up with is 
essentially RDF with all of the associated performance problems. 

The links below are some of my favorite posts on good data modeling practices 
although it certainly isn't 100% comprehensive. 

https://neo4j.com/blog/data-modeling-pitfalls/
https://neo4j.com/blog/dark-side-neo4j-worst-practices/

Sent from my iPhone

> On May 1, 2017, at 04:37, John Begley  wrote:
> 
> Hi, was there an update to this. The core problem I'm seeing on a graph I'm 
> working on is very similar. Basically I am creating a graph of people. In 
> order to match people I am creating separate nodes around key matching 
> criteria (like date of birth, first name, family name and gender).  With 
> cleanish data going in then half the person nodes will have a relationship to 
> the male gender node and half to the female gender node.  I'm finding that 
> when I ramp up the performance tests (with a unique constraint on gender) 
> then the performance degrades hugely but if I remove the constraint then I 
> get multiple gender nodes which doesn't help with matching people!
> 
> Is there a common pattern/approach for solving this?
> 
> Thanks,
> John
> 
> -- 
> 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.

-- 
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.


Re: [Neo4j] Slow node creation/commits with unique constraint in 2.0.0

2017-05-01 Thread John Begley
Hi, was there an update to this. The core problem I'm seeing on a graph I'm 
working on is very similar. Basically I am creating a graph of people. In order 
to match people I am creating separate nodes around key matching criteria (like 
date of birth, first name, family name and gender).  With cleanish data going 
in then half the person nodes will have a relationship to the male gender node 
and half to the female gender node.  I'm finding that when I ramp up the 
performance tests (with a unique constraint on gender) then the performance 
degrades hugely but if I remove the constraint then I get multiple gender nodes 
which doesn't help with matching people!

Is there a common pattern/approach for solving this?

Thanks,
John

-- 
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.


Re: [Neo4j] Slow node creation/commits with unique constraint in 2.0.0

2016-05-26 Thread 'Michael Hunger' via Neo4j
I meant:

with an index you the fast lookup but no pentalty
with an constraint you have the uniqueness guarantee via a lock and check 
against the constraint on write, both of which cost.

But I ask if that can be alleviated.

Could you test it in 3.0.2 if it performs better?

Michael

> Am 27.05.2016 um 00:29 schrieb Eric Fulton :
> 
> I'm sorry, I'm not sure exactly what you mean by query scan.  I haven't 
> changed any of the queries from before the addition of the uniqueness 
> constraint.  I'm still doing the same "MERGE ..." query (like above, but with 
> parameters, as you pointed out).  Do you mean that, or something else?
> 
> Thanks!
> Eric
> 
> -- 
> 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.

-- 
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.