Java – does it make sense to have an SQL Preparedstatement pool?

See the English answer > Preparedstatement pool with connection pool 1

Solution

I think what you are looking for is to cache prepared statements Some connection pools can make you an optional tuning parameter (Weblogic, I also think JBoss) It is applicable to the case that the same preparation statement is used multiple times in the runtime session, not necessarily in the same transaction Your static approach basically means that you only think you will have one of them, rather than needing a cache of multiple statements, so it will work in theory I'm not sure if the prepared statement cache can be shared across connections or connection specific

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>