1. Why do we need to enable the Connection when using jdbc? once it is used up, it is immediately closed. What will happen if my Connection is opened at the beginning and closed at the end of the entire program? 2. Why use the connection pool? When using the connection pool, do you need to emphasize the connection opening and closing? If
1. Why do we need to enable the Connection when using jdbc? once it is used up, it is immediately closed. What will happen if my Connection is opened at the beginning and closed at the end of the entire program? 2. Why use the connection pool? When using the connection pool, do you need to emphasize the connection opening and closing? If
1. Why do we need to enable the Connection when using jdbc? once it is used up, it is immediately closed. What will happen if my Connection is opened at the beginning and closed at the end of the entire program?
2. Why use the connection pool? When using the connection pool, do you need to emphasize the connection opening and closing? If the connection pool is not used, what performance impact will it bring?
In short, I always feel that I will use JDBC or c3p0 to write database access programs, but I still have no idea about the concepts of connection and statement and the impact of performance.
I don't know if I have some tips.