您好我正在尝试将边缘文件加载到每个大约80000条记录的neo4j。 我正在使用:
USING PERIODIC COMMIT 500 LOAD CSV WITH HEADERS FROM
"file:///EdgesWriterSong_wrote.csv" AS csvLine
MATCH (writer:Writer { id: toInt(csvLine.WriterId),(songs:Songs { SongId: toInt(csvLine.SongId)
CREATE (writer)-[r:Wrote]->(songs)
加载时间过长。请问有更快的方法吗?
答案 0 :(得分:1)
您的查询有语法错误,但我假设您的实际代码如下所示:
node-sass -rw scssFiles -o cssOutputFiles
这种简单查询缓慢的最明显原因是您尚未为USING PERIODIC COMMIT 500 LOAD CSV WITH HEADERS FROM "file:///EdgesWriterSong_wrote.csv" AS csvLine
MATCH (writer:Writer { id: toInt(csvLine.WriterId) }),
(songs:Songs { SongId: toInt(csvLine.SongId) })
CREATE (writer)-[r:Wrote]->(songs);
和:Writer(id)
创建indexes。通过运行这两个查询(一次一个)来做到这一点:
Songs(SongId)