情况是这样的,数据库数据量实体一千多万,关系一千多万. 然后查询出一副子图,在子图中取两个节点进行当前子图的所有路径查询,在数据量小的情况下,下面的查询语句能执行成功,当数据量大时一直在计算中,请问有没办法优化?
查询语句match path=(n)-[*]-(m) where id(n)=2114948 and id(m) = 2114950 and all(edgeId in relationships(path) where id(edgeId) in [264427, 264431, 264430, 264429, 264428, 264432, 264433, 264492, 264490, 264491, 264535, 264602, 264603, 264600, 264601, 264598, 264599, 264596, 264597, 264595, 8774864, 262052, 1272279, 1272278, 1272277, 1272276, 1272275, 1272274, 1272273, 1272272, 1272280, 1272270, 1405800, 1405801, 1405798, 1405796, 1405797, 1405794, 1405795, 1405772, 1405774, 1405775, 1405785, 1405786, 3855221, 3855217, 3855219, 2351757, 2351759, 2351768, 2351771, 2351762, 2351764, 2351787, 2351791, 2351789, 2351802, 2351806, 2351855, 2351865, 2351921, 2351933, 2351908, 2768212, 2775883, 2778703, 2770304, 2782157, 2899993, 2899992, 2899995, 2899994, 2899997, 2899996, 2899999, 2899998, 2900019, 2900018, 2900226, 2900227, 2900224, 2900225, 2900230, 2900231, 2900228, 2900229, 2900234, 2900232, 2900238, 2900243, 2900245, 2900255, 2900253, 2900264, 2900278, 2900670, 2900671, 2900668, 2900669, 2964220, 264356]) return path