How to insert a large amount of data with good performance?
xg-github-00 opened this issue · 2 comments
xg-github-00 commented
I tried using interface of saveAll to insert a large amount of data, but it was a bit slow. I saw the interface of insertDocuments function and I don't know if it can improve performance. Is there a specific example to show how to use it?Could you please give some advises?Thanks~
rashtao commented
I would recommend using the underlying Java Driver directly, which is accessible via com.arangodb.springframework.core.ArangoOperations#driver()
.
You can then bulk insert documents with com.arangodb.ArangoCollection#insertDocuments(java.util.Collection<?>, com.arangodb.model.DocumentCreateOptions)
and its overloaded variants.
xg-github-00 commented
I tried and it runs faster than before, thanks~ :-)