First at all, you (the neo-developers) did a great job in 2.2!
The new cypher cost-planner is amazing. Executing a query rule-based takes 
16 seconds, and in the new cost-based planner it’s down to <1 second. 
 AWESOME!!


But there is one little thing. I try to mix writing operations and 
read-ops, but it seems not to use the cost-planner?

*  db*.execute(*"CYPHER 2.2 PLANNER COST " *+
             *"MATCH (rundgangVorlage) WHERE 
id(rundgangVorlage)={rundgangVorlage} " *+
             *"MATCH 
(rundgangVorlage)-[:BEREICH]->(:Bereich)-[:FRAGE*1..]->(:Frage)<-[:PRUEFEN]-(pruefNode:Pruefung)
 
" *+
             *"MATCH 
(rundgangVorlage)<-[:IN_RUNDGANG]-()-[:HAS_ORT*0..]->()-[:PRUEFEN]->(pruefNode) 
" *+
             *"WITH pruefNode " *+
             *"MATCH (rundgang) WHERE id(rundgang)={rundgang} " *+
             *"MERGE (rundgang)<-[:AKTIV]-(pruefNode) " *+
             *"RETURN count(pruefNode) as count"*,
        *map*(*"rundgangVorlage"*, asNodeId(), *"rundgang"*, 
rundgangNode.getId());


doing the write operation externally like

*  db*.execute(*"CYPHER 2.2 PLANNER COST " *+
             *"MATCH (rundgangVorlage) WHERE 
id(rundgangVorlage)={rundgangVorlage} " *+
             *"MATCH 
(rundgangVorlage)-[:BEREICH]->(:Bereich)-[:FRAGE*1..]->(:Frage)<-[:PRUEFEN]-(pruefNode:Pruefung)
 
" *+
             *"MATCH 
(rundgangVorlage)<-[:IN_RUNDGANG]-()-[:HAS_ORT*0..]->()-[:PRUEFEN]->(pruefNode) 
" *+
             *"RETURN pruefNode "*,
        *map*(*"rundgangVorlage"*, asNodeId()))
        .columnAs(*"pruefNode"*)
        .forEachRemaining(node -> 
((Node)node).createRelationshipTo(rundgangNode, RelTypes.*AKTIV*));


works great. any ideas?

cheers, Thomas




sorry for the german-cypher, just copied it from real code ;)

-- 
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