Hi,

there is a number of resources for optimizing Cypher queries.
We had the webinar: http://watch.neo4j.org/video/84900121
and blog posts from Wes: http://wes.skeweredrook.com/cypher/  and Mark
http://www.markhneedham.com/blog/category/databases-2/neo4j/
and Luanne
http://thought-bytes.blogspot.de/2013/01/optimizing-neo4j-cypher-queries.html
and some others.

Right now that advise is fluid as the Cypher team works on a new optimizer
that you can already test with the cypher 2.1.experimental prefix.

In general I recommend to keep the complexity of your queries at bay, esp.
the combinatorial explosion of large path matches (try to reduce the
cardinality in between).
So simpler queries are definitely faster.
Make also sure you have the right indexes/constraints in place and you do
graph local queries.
Sending multiple as part of a single request definitely makes sense.

**Best of course is to try the queries on your own data and use-cases
(first perhaps limiting results)**

You might also look into the profiler output that's currently available in
the classic UI localhost:7474/webadmin/#/console/ and the bin/neo4j-shell
with the "profile" prefix.

HTH,

Michael



On Mon, Jun 30, 2014 at 2:20 PM, <b...@devel.io> wrote:

> For mostly write-based queries, does the query engine perform better with
> one medium/large Cypher query or several smaller queries in succession? I
> am using the HTTP transactional endpoint and sending all statements in one
> request, so latency is constant.
>
> Also, is there a general resource/listing of Cypher optimizations that
> have been made over the past few releases? Specifically, regarding
> rewriting of Cypher statements to use optimal patterns? For example, is
> constructing a long MATCH path a waste if one of the nodes has a unique
> index? Should the MATCH only include that node followed by a WITH statement
> for the rest of the pattern?
>
> --
> 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.
>

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

Reply via email to