나는 다음과 같은 쿼리가 :이 쿼리의Neo4j 사이퍼 성능 쿼리 최적화
MATCH (dg:DecisionGroup)-[:CONTAINS]->(childD:Decision)
WHERE dg.id = 1
MATCH (childD)-[relationshipValueRel4:HAS_VALUE_ON]-(filterCharacteristic4:Characteristic)
WHERE filterCharacteristic4.id = 4
WITH relationshipValueRel4, childD, dg
WHERE (ANY (id IN [2,3]
WHERE id IN relationshipValueRel4.optionIds))
WITH childD, dg
OPTIONAL MATCH (childD)-[vg:HAS_VOTE_ON]->(c:Criterion)
WHERE c.id IN [2, 3]
WITH childD, dg, vg.avgVotesWeight as weight, vg.totalVotes as totalVotes
RETURN childD LIMIT 10
프로필 정보 :
사이퍼 버전 : 사이퍼 3.3, 플래너 : 비용, 런타임 : 해석합니다. 4 MS
그러나에서 2773 전체 DB 안타 나는 쿼리 하나 개 더 라인을 추가 할 때 : WITH childD , dg , toFloat(sum(weight)) as weight, toInt(sum(totalVotes)) as totalVotes
를 쿼리 보이는 같은 :
MATCH (dg:DecisionGroup)-[:CONTAINS]->(childD:Decision)
WHERE dg.id = 1
MATCH (childD)-[relationshipValueRel4:HAS_VALUE_ON]-(filterCharacteristic4:Characteristic)
WHERE filterCharacteristic4.id = 4
WITH relationshipValueRel4, childD, dg
WHERE (ANY (id IN [2,3]
WHERE id IN relationshipValueRel4.optionIds))
WITH childD, dg
OPTIONAL MATCH (childD)-[vg:HAS_VOTE_ON]->(c:Criterion)
WHERE c.id IN [2, 3]
WITH childD, dg, vg.avgVotesWeight as weight, vg.totalVotes as totalVotes
WITH childD , dg , toFloat(sum(weight)) as weight, toInt(sum(totalVotes)) as totalVotes
RETURN childD LIMIT 10
프로필 정보는 다음과 같습니다.
Cypher 버전 : CYPHER 3.3, 플래너 : 비용, 런타임 : INTERPRETED. 그것은이 추가 사이퍼에 너무 오래 작동하고 왜 6747 MS
대 4 MS - 6747 MS
의 차이에 7,818,908 총 dB 히트는 매우 크다 교육 및 최적화 방법
다른 쿼리에 대한 PROFILE 계획을 추가하고 어떤 레이블을 추가 할 수 있습니까? – InverseFalcon
@InverseFalcon 첫 번째 쿼리에 대한 PROFILE 계획이 있습니다. – alexanoid