JDBC and Multithreading

前端 未结 3 492
栀梦
栀梦 2021-02-04 19:19

I am trying to run few queries using a multithreaded approach, however I think I am doing something wrong because my program takes about five minute to run a simple select state

3条回答
  •  误落风尘
    2021-02-04 19:42

    Don't use the same connection object in all threads. Give each thread a dedicated database connection.

提交回复
热议问题