One local Berkeley database.
The net result:
{"timer":10,"results":[20]} //vertex-centric indexing
{"timer":1619,"results":[20]} //linear scan of edge properties
RexConnectConsole setup:
$ bin/rexConnectConsole.sh
" ---===##\
" --==##\
" ---===################>
" --==##/
" ---===##/
RexConnect Console 0.3.1
{rexpro_port=8184, rexpro_graph_name=graph, rexconnect_port=8185, rexpro_hosts=rexster, rexpro_timeout_ms=120000}
-------------------------------------------------------------
# RexConnect> query
# ...script (0; string): g
# ...params (1; string; opt):
{"timer":5,"results":["titangraph[local:data/FabricIndex]"]}
# RexConnect> query
# ...script (0; string): factorType = g.makeType().name("FactorType").dataType(Integer.class).unique(OUT).indexed(Vertex.class).makePropertyKey(); g.makeType().name("uses").unique(OUT).primaryKey(factorType).makeEdgeLabel();
# ...params (1; string; opt):
{"timer":695,"results":[{"_id":"36028797018963990","_type":"vertex"}]}
# RexConnect> query
# ...script (0; string): a = g.addVertex([ArtifactId:1]); (1..100000).each { ft = (it%5000); f = g.addVertex([FactorId:it, FactorType:ft]); g.addEdge(f, a, "uses", [FactorType:ft, NotIndexed:ft]); }; a;
# ...params (1; string; opt):
{"timer":29321,"results":[{"_properties":{"ArtifactId":1},"_id":"4","_type":"vertex"}]}
# RexConnect> query
# ...script (0; string): g.v(4).inE('uses').count();
# ...params (1; string; opt):
{"timer":3617,"results":[100000]}
# RexConnect> query
# ...script (0; string): g.v(4).inE('uses').count();
# ...params (1; string; opt):
{"timer":1272,"results":[100000]}
# RexConnect> query
# ...script (0; string): g.v(4).inE('uses').has('FactorType', Tokens.T.eq, 8).inV.count();
# ...params (1; string; opt):
{"timer":45,"results":[20]}
# RexConnect> query
# ...script (0; string): g.v(4).inE('uses').has('FactorType', Tokens.T.eq, 8).inV.count();
# ...params (1; string; opt):
{"timer":10,"results":[20]}
# RexConnect> query
# ...script (0; string): g.v(4).inE('uses').has('NotIndexed', Tokens.T.eq, 8).inV.count();
# ...params (1; string; opt):
{"timer":2390,"results":[20]}
# RexConnect> query
# ...script (0; string): g.v(4).inE('uses').has('NotIndexed', Tokens.T.eq, 8).inV.count();
# ...params (1; string; opt):
{"timer":1619,"results":[20]}