I have two kind of query the first one I start from a node such as match (n:student) optional math (n)-[R:takes]-(n2:course) return n, n2
The second kind of request: I have to start (point) from a relationship such as: match ()-[R:takes]-() optional match ()-[R:takes]-(n:student) optional match (n:student)-[R:takes]-(p:course) return n,p but when I make this kind of query specially if I point to a relationship it takes a looooot of time :( so can I find another solution how to improve this type of query (with optional much) thank for your help Le jeudi 12 avril 2018 14:03:47 UTC+2, eve.freema a écrit : > > Without a query it’s hard to help you on this... > > Often, I tell people to start with a match of what you know exists, and > then do an optional match for what you’re not sure exists, like: > > match (p:Person) // we want to get all Person nodes > optional match (p)-[:FOLLOWS]->(maybe:Person) > return p.name, maybe.name > > This way, you give the engine some help with the starting point. Does this > help? > > Eve > > On Thu, Apr 12, 2018 at 3:42 AM Marwa Elabri <marwa...@gmail.com > <javascript:>> wrote: > >> Hello >> >> please are there another clause that replace optional match in cypher >> query language >> because I want to get null value from my neo4j database but when I use >> *optional >> mach* with a huge database the request execution takes a lot of time ???? >> >> Thank you in advance >> >> -- >> 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+un...@googlegroups.com <javascript:>. >> 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.