crazy, I think this query just explodes.

0. try "explain" on that query (in 2.2) -> you should see how expensive it is
1. small statements, one merge per statement -> MATCH (a:Label {prop}),(b:Label 
{prop}) MERGE a->b
2. parameters for remote calls
3. you do a cross product + filter
4. do you have indexes for all your lookups :user(kybe_id), :page(fb_id), 
:category(name)

Michael

> Am 27.03.2015 um 10:17 schrieb Innovify Agile <[email protected]>:
> 
> Thanks for help guys,
> 
> 
> Yes i'm using merge as well.
> 
> Recently i'm facing server hangup error.
> 
> When i'm executing cypher query for match and create relationship for fb 
> likes (only for 5 likes) , neo4j got disconnect  and node.relationship are 
> messing up.
> 
> Please help me here.
> 
> Here is my query :
> 
> MATCH (ee:user) WHERE ee.kybe_id = "165" MATCH (woc0:page) WHERE woc0.fb_id = 
> "201568430041866" MATCH (cac0:category) WHERE cac0.name = "Musician/band" 
> MATCH (woc1:page) WHERE woc1.fb_id = "176279132441949" MATCH (cac1:category) 
> WHERE cac1.name = "Musician/band" MATCH (woc2:page) WHERE woc2.fb_id = 
> "115147381983974" MATCH (cac2:category) WHERE cac2.name = "Musician/band" 
> MATCH (woc3:page) WHERE woc3.fb_id = "616076845140570" MATCH (cac3:category) 
> WHERE cac3.name = "Musician/band" MATCH (woc4:page) WHERE woc4.fb_id = 
> "550011758373396" MATCH (cac4:category) WHERE cac4.name = "Musician/band" 
> MATCH (woce0:page) WHERE woce0.fb_id = "201568430041866" MATCH 
> (cace0:category) WHERE cace0.name = "Musician/band" MATCH (woce1:page) WHERE 
> woce1.fb_id = "176279132441949" MATCH (cace1:category) WHERE cace1.name = 
> "Musician/band" MATCH (woce2:page) WHERE woce2.fb_id = "115147381983974" 
> MATCH (cace2:category) WHERE cace2.name = "Musician/band" MATCH (woce3:page) 
> WHERE woce3.fb_id = "616076845140570" MATCH (cace3:category) WHERE cace3.name 
> = "Musician/band" MATCH (woce4:page) WHERE woce4.fb_id = "550011758373396" 
> MATCH (cace4:category) WHERE cace4.name = "Musician/band" MERGE 
> (ee)-[:LIKED]->(woc0) MERGE (woc0)-[:BELONGSTO]->(cac0) MERGE 
> (ee)-[:LIKED]->(woc1) MERGE (woc1)-[:BELONGSTO]->(cac1) MERGE 
> (ee)-[:LIKED]->(woc2) MERGE (woc2)-[:BELONGSTO]->(cac2) MERGE 
> (ee)-[:LIKED]->(woc3) MERGE (woc3)-[:BELONGSTO]->(cac3) MERGE 
> (ee)-[:LIKED]->(woc4) MERGE (woc4)-[:BELONGSTO]->(cac4) MERGE 
> (ee)-[:LIKED]->(woce0) MERGE (woce0)-[:BELONGSTO]->(cace0) MERGE 
> (ee)-[:LIKED]->(woce1) MERGE (woce1)-[:BELONGSTO]->(cace1) MERGE 
> (ee)-[:LIKED]->(woce2) MERGE (woce2)-[:BELONGSTO]->(cace2) MERGE 
> (ee)-[:LIKED]->(woce3) MERGE (woce3)-[:BELONGSTO]->(cace3) MERGE 
> (ee)-[:LIKED]->(woce4) MERGE (woce4)-[:BELONGSTO]->(cace4)
> 
> 
> On Thursday, March 26, 2015 at 3:36:31 AM UTC+5:30, Michael Hunger wrote:
> You can use merge
> If you have indexes or constraints they will be used for the check
> 
> Von meinem iPhone gesendet
> 
> Am 24.03.2015 um 08:15 schrieb Innovify Agile <[email protected] 
> <javascript:>>:
> 
>> Hi all,
>> 
>> I am working on store facebook data (User details, Likes , Posts, comments , 
>> friends , Family , Events) into neo4j database.
>> For that we are first getting data from facebook APIs then storing data into 
>> neo4j.
>> 
>> Here i have attached graph as well.
>> 
>> Now my problem is how can i check node is exist or not if exist then update 
>> property and not then create not with property and relationship using batch 
>> cypher.
>> 
>> Thanks
>>  
>> 
>> -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
>> <download (1).png>
> 
> 
> -- 
> 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