运行以下gremlin查询时出现问题:
g.V().has('[label]', 'Customer').valueMap(true, 'customer_id')
我在'[label]'上使用混合索引,但是valueMap步骤在执行过程中仍然是同步的。这会导致查询性能降低,并且随着图形的增长而无法很好地扩展。
gremlin> g.V().has('[label]', 'Customer').valueMap(true, 'customer_id').profile()
==>Traversal Metrics
Step Count Traversers Time (ms) % Dur
=============================================================================================================
JanusGraphStep([],[[label].eq(Customer)]) 21113 21113 1991.216 9.49
\_condition=([label] = Customer)
\_isFitted=true
\_query=[([label] = Customer)]:node_label_mixed
\_index=node_label_mixed
\_orders=[]
\_isOrdered=true
\_index_impl=search
optimization 0.039
optimization 0.908
backend-query 0.000
\_query=node_label_mixed:[([label] = Customer)]:node_label_mixed
backend-query 0.000
\_query=node_label_mixed:[([label] = Customer)]:node_label_mixed
backend-query 0.000
\_query=node_label_mixed:[([label] = Customer)]:node_label_mixed
backend-query 0.000
\_query=node_label_mixed:[([label] = Customer)]:node_label_mixed
backend-query 21113 5589.282
\_query=node_label_mixed:[([label] = Customer)]:node_label_mixed
PropertyMapStep([customer_id],value) 21113 21113 18982.089 90.51
是否有更好的方法来编制此查询,使其可以并行运行,以便获得一次获取所有节点属性的更好性能?