The following are some general recommendations for working with Amazon Neptune. Use this information as a reference to quickly find recommendations for using Amazon Neptune and maximizing performance.
Contents
Best practices using the Gremlin Java client with Neptune
Use the latest compatible version of the Apache TinkerPop Java client
Create separate Gremlin Java client objects for read and write endpoints
Add multiple read replica endpoints to a Gremlin Java connection pool
Set maxInProcessPerConnection and maxSimultaneousUsagePerConnection to the same value
Send queries to the server as bytecode rather than as strings
Always completely consume the ResultSet or Iterator returned by a query
Neptune Best Practices Using openCypher and Bolt
Neptune does not support multiple concurrent queries in a transaction
Place more restrictive nodes on the left side in Variable-Length Path (VLP) expressions
Avoid redundant node label checks by using granular relationship names
Prefer the properties function over individual property lookup when retrieving all property values