生产环境下如何复用数据库连接,是否需要使用线程池 #40051
Unanswered
PeterLu798
asked this question in
Q&A and General discussion
Replies: 1 comment 2 replies
-
不需要每次都重新连接,重新连接肯定影响性能。 try: try: try: 一个进程中用同一个client对象都是可以的,可跨多线程使用同一个client对象,但不要跨子进程使用同一个client对象。也可以每个线程里创建一个MilvusClient对象。 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
根据Milvus文档,一个正确的查询应该如下:
那么生产环境下如果每来一个请求则重新创建连接,是否会影响性能?有没有什么办法能复用连接呢?
Beta Was this translation helpful? Give feedback.
All reactions