Search code examples
neo4jpy2neo

Neo4j batching using REST interface locking database?


When batching several queries in an HTTP requests for Neo4j, does that cause the graph database to perform all the queries in the HTTP request before moving to the next request?

Could this potentially mean that a large enough batch would lock the whole database for the time it takes to perform all queries in the batch? Or are they somehow run in parallel?

Is the batching using the REST interface (and py2neo) using the batch inserter (so its non transactional) or normal transactional insertion?

Thanks


Solution

  • It performs all queries in the batch request, but other queries can come in in parallel and are executed on other threads. It is only if your batch-request consumes all CPU, Memory, IO that it affects other queries.

    I would use the transactional API from 2.x on.