Gremlin vs Cypher
Romiko Derbynew comparing Gremlin and Neo4j Cypher:
- Simple graph traversals are much more efficient when using Gremlin
- Queries in Gremlin are 30-50% faster for simple traversals
- Cypher is ideal for complex traversals where back tracking is required
- Cypher is our choice of query language for reporting
- Gremlin is our choice of query language for simple traversals where projections are not required
- Cypher has intrinsic table projection model, where Gremlins table projection model relies on AS steps which can be cumbersome when backtracking e.g. Back(), As() and _CopySplit, where cypher is just comma separated matches
- Cypher is much better suited for outer joins than Gremlin, to achieve similar results in gremlin requires parallel querying with CopySplit, where as in Cypher using the Match clause with optional relationships
- Gremlin is ideal when you need to retrieve very simple data structures
- Table projection in gremlin can be very powerful, however outer joins can be very verbose
So in a nutshell, we like to use Cypher when we need tabular data back from Neo4j and is especially useful in outer joins.
Original title and link: Gremlin vs Cypher (©myNoSQL)
via: http://romikoderbynew.com/2012/02/22/gremlin-vs-cypher-initial-thoughts-neo4j/