Re: [Neo4j] Query taking so long and not giving result

2014-10-03 Thread Michael Hunger
Don't repeat your full match time and again (it will be a full graph scan every time) how much data do you have in your graph after all this is a global query? so for your query I recommend at least to add a label + index create index on :Crime(type); MATCH (k:Crime {type:"ASSAULT"})-[:CLOSE_T

[Neo4j] Query taking so long and not giving result

2014-10-03 Thread Mohana Krishna, IIT Bombay, India
I have issued a following query as part of my application: MATCH (k{type:"ASSAULT"})-[r1:CLOSE_TO]->( l {type:"BATTERY"}), (k{type:"ASSAULT"})-[r2:CLOSE_TO]->(m{type:"THEFT"}), (k{type:"ASSAULT"})-[r3:CLOSE_TO]->(n{type:"NARCOTICS"}), ( l {type:"BATTERY"})-[r4:CLOSE_TO]->(m{type:"THEFT"}),