Can you share the current query plan that you get when you prefix your query with PROFILE
Also the size and structure of your datastore and the output of :schema to list existing indexes and constraints. > Am 22.08.2016 um 21:28 schrieb Divya Saxena <[email protected]>: > > Hi, > Can someone help me in making the following query more efficient. > > > MATCH n=(node1:Node1)<-[:RELATION1]-(node2:Node2) > WHERE node2.entity2 IN ['ABC','LMN','PQR'] > AND node1.entity1 IN ['XYZ'] WITH COUNT(n) as nCount > MATCH (node11:Node1)<-[:RELATION1]-(node21:Node2) > WHERE node2.entity2 IN ['ABC','LMN','PQR'] > AND (node11.entity1 IN ['XYZ'] AND nCount = 0) > MATCH (node12:Node1)-[:RELATION2]->(node3:Node3)<-[:RELATION1]-(node22:Node2) > WHERE (node3.entity3 >= 5 OR node3.entity3 <= 70 > AND (node12.entity1 IN ['XYZ'] OR node12.entity1 IN ['XYZ'])) > MATCH (node4:Node4{entity1 : 'PPP'}) > WHERE none (condition0 IN ['AAA'] > WHERE condition0 IN ['BBB']) OR ('AAA' IN ['BBB'] > AND 1471888050 < timestamp()) RETURN node4 > > -- > 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. -- 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.
