What is the fastest way to build R-tree in neo4j spatial?

28 views
Skip to first unread message

Sun Yuhan

unread,
May 3, 2017, 2:32:42 PM5/3/17
to Neo4j
I want to load millions of spatial data into neo4j to build spatial index. When I test with 1M spatial points, it takes about 1 hour to build the R-tree index. What is the maximum throughput of building spatial index in neo4j. In my case, it is 1,000,000/3600s = 277 nodes/s. Of course it is too slow. Is there other alternatives to speed up the spatial index construction. For comparison, to build Gist index in postgres takes only 30 seconds on the same dataset.

Craig Taverner

unread,
May 4, 2017, 5:40:21 AM5/4/17
to ne...@googlegroups.com
The 0.24 version of Neo4j Spatial includes a bulk-insert when you call layer.addNodes() to insert many nodes at once, and this is now much faster than before. Can you try that and see how well it works for you? Best not to add all 1M in the same call, but perhaps add 1k or 10k at a time.


On Wed, May 3, 2017 at 8:32 PM, Sun Yuhan <wdmz...@gmail.com> wrote:
I want to load millions of spatial data into neo4j to build spatial index. When I test with 1M spatial points, it takes about 1 hour to build the R-tree index. What is the maximum throughput of building spatial index in neo4j. In my case, it is 1,000,000/3600s = 277 nodes/s. Of course it is too slow. Is there other alternatives to speed up the spatial index construction. For comparison, to build Gist index in postgres takes only 30 seconds on the same dataset.

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages