Test querying Titan
This project is intended to test querying Titan, Gremlin and Gremlin-Scala. I created this project after having performance issues and though it would be easier to troubleshoot.
Basically we are loading Vertices from XML files:
This is a SBT project so run:
sbt clean "run -i [indexing mode] -q [querying mode]"
[indexing mode]
can be:
[querying mode]
can be:
graph.query().has("dmdid", id).has("type", type).vertices().toStream
new GremlinPipeline(graph.getVertices("dmdid", id)).has("type", type).cast(classOf[Vertex]).iterator().toStream
new GremlinPipeline(graph.getVertices).has("dmdid", id).has("type", type).cast(classOf[Vertex]).iterator().toStream
new GremlinPipeline(graph).V().has("dmdid", id).has("type", type).cast(classOf[Vertex]).iterator().toStream
graph.V.has("dmdid", id).has("type", type).toStream()
GremlinScalaPipeline(graph).V.has("dmdid", id).has("type", type).toStream()
GremlinScalaPipeline.fromElements(graph.getVertices("dmdid", id)).has("type", type).toStream
graph.V.has("dmdid", id).has("type", type)
(this code is Groovy code executed via the GremlinGroovyScriptEngine)Here is what I measured on my machine (the times are the execution time given by SBT):
sbt clean "run -i titan -q graphQuery
: ~157ssbt clean "run -i titan -q javaPipes1
: ~156ssbt clean "run -i titan -q javaPipes2
: too much (not using indexing)sbt clean "run -i titan -q javaPipes3
: ??? (Using indexing)sbt clean "run -i titan -q scalaPipes1
: too much (not using indexing)sbt clean "run -i titan -q scalaPipes2
: too much (not using indexing)sbt clean "run -i titan -q scalaPipes3
: using indexingsbt clean "run -i titan -q groovyQuery
: ~170ssbt clean "run -i es -q graphQuery
: too much (not using indexing)sbt clean "run -i lucene -q graphQuery
: too much (not using indexing)