在使用Neo4j/Neo4j Spring Data时,使用Spring的@Transactional(readOnly = true)
有什么好处吗?我应该将只读事务标记为@Transactional(readOnly = true)
吗?
在使用Neo4j/Neo4j Spring Data时,使用Spring的@Transactional(readOnly = true)
有什么好处吗?我应该将只读事务标记为@Transactional(readOnly = true)
吗?
http://docs.spring.io/spring-data/data-neo4j/docs/4.2.x/reference/html/#_read_only_transactions
标记为只读的事务将路由到Neo4j中的从节点/读取副本节点。这减轻了领导节点的负担,使它们能更好地处理写查询。