I think you just create a cross product here. 3842* 938* 2755

try this

create index on :dwhElement(ElementID);
create index on :aifElement(ElementID);

> MATCH (c:dwh2aif)
match (a:dwhElement)
> 
> where a.ElementID = c.dwhElementID
match (b:aifElement)
> WHERE c.aifElementID = b.ElementID  
> CREATE (a)-[r:dwh_FEEDS_aif]->(b)
> return r; 

you can look at your query plan if you prefix your query with EXPLAIN or 
PROFILE (also runs it)

> Am 15.04.2015 um 10:27 schrieb Andreas Dernbauer 
> <[email protected]>:
> 
> I tried to connect to graphs by using a Bridge table
> 
> MATCH (a:dwhElement),(b:aifElement),(c:dwh2aif)
> where a.ElementID = c.dwhElementID and c.aifElementID = b.ElementID  
> CREATE (a)-[r:dwh_FEEDS_aif]->(b)
> return r; 
> 
> After at least one hour I got as result uknown error,
> 
> MATCH (a:dwhElement)
> return count(a);
> returns 3842 rows
> 
> MATCH (a:aifElement)
> return count(a);
> returns 938 rows
> 
> MATCH (a:dwh2aif)
> return count(a);
> returns 2755 rows
> 
> MATCH (a:dwhElement),(b:dwh2aif)
> where a.ElementID = b.dwhElementID
> return count(a),count(b);
> count(a) = 2755
> count(b) = 2755
> 
> Any Ideas ? 
> 
> Thank you 
> 
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to