【问题标题】:Connection pool performance in javajava中的连接池性能
【发布时间】:2022-08-18 18:02:00
【问题描述】:

如何在java中实际检查不同连接池的性能。我尝试在for循环中关闭和打开连接,但我发现性能没有差异,几乎同时完成10000次迭代。谁能给我编程代码来分析各种池的性能差异

    标签: java jdbc connection-pooling


    【解决方案1】:

    根据官方文档:

    acquireIncrement Determines how many connections at a time c3p0 will try to 
    acquire when the pool is exhausted.
    

    setAcquireIncrement() 用一个整数设置这个值:

    void setAcquireIncrement(int acquireIncrement)
                         throws javax.naming.NamingException
    

    更多细节在这里https://www.mchange.com/projects/c3p0/

    【讨论】:

      猜你喜欢
      • 2010-10-24
      • 1970-01-01
      • 2013-04-08
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 1970-01-01
      • 2015-11-12
      • 2020-02-09
      相关资源
      最近更新 更多