-
Neo4j version : 3.3.0
-
性能問題

image.png
批量CSV文件導(dǎo)入時(shí),發(fā)現(xiàn)neo4j只使用了一個(gè)核,official也沒有關(guān)于CPU調(diào)優(yōu)的說法,待填坑。
提交csv文件加載入庫(kù)的過程中,發(fā)現(xiàn)包含正確路徑的Cql語(yǔ)句在被neo4j 提取時(shí),原路徑被莫名的添加了一段絕對(duì)路徑。
Input:
LOAD CSV WITH HEADERS FROM 'file:/tmp/<csv_filename>.csv'
AS line CREATE (:<NodeName> { <property_name>:line.<property_name>, <property_name1>:line.<property_name1>})
Outputs
[T] 2018-05-08 12:19:44 999 neo4j_jober.go:104
&{[{Neo.ClientError.Statement.ExternalResourceFailed Couldn't load the external resource at:
file:/data/neo4j/import/tmp/<csv_filename>.csv }] [] 0}
Solution
編輯neo4j.conf,將其中
19 # This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or comment it out to
20 # allow files to be loaded from anywhere in the filesystem; this introduces possible security problems. See the
21 # `LOAD CSV` section of the manual for details.
22 dbms.directories.import=/var/lib/neo4j/import
dbms.directories.import注釋即可