You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from py2neo import Graph, Database
# Initialize the Graph object with connection pool settings
graph = Graph("bolt://localhost:7687", auth=("neo4j", "password"), max_connections=10)
def run_query():
# Run your Cypher query
result = graph.run("MATCH (n) RETURN n LIMIT 10")
for record in result:
print(record)
# Example usage
if __name__ == "__main__":
# Run the query multiple times to test performance
for _ in range(5):
run_query()
py2neo运行同样的程序, 静止一段时间后再调用,时间变长。运行时间间隔少于10s则不会出现问题。py2neo 2021.2
The text was updated successfully, but these errors were encountered: