Fwd: A suggestion or a problem
Fwd: A suggestion or a problem
Dave Cramer
---------- Forwarded message ----------
From: fenglu@highgo.com <fenglu@highgo.com>
Date: 30 August 2017 at 23:41
Subject: A suggestion or a problem
To: pgsql-jdbc-owner <pgsql-jdbc-owner@postgresql.org>
From: fenglu@highgo.com <fenglu@highgo.com>
Date: 30 August 2017 at 23:41
Subject: A suggestion or a problem
To: pgsql-jdbc-owner <pgsql-jdbc-owner@postgresql.org>
Hi,
I have a problem when I learned about PGJDBC's source code.
When I closed a preparedStatement,PGJDBC driver will put the preparedQuery in the statementCache.When I perform the SQL again, the cache will remove it, and then if I don't have to perform the preparedStatement.close(), but the third time to perform the SQL, is it need to compile again leading to reduced performance?
Why not choose to set the cache to the LinkedHashMao type and set the maximum number ,use cache.get(key) and remove the least amount according to the SQL usage when the cache reaches its maximum value?
融知与行,瀚且高远
------------------------------
山东瀚高基础软件股份有限公司 冯路
地址:济南市高新区新泺大街2117号铭盛大厦20层2001室
电话:0531-88235867 传真:0531-88235883
邮箱:hangaocaiwubu@highgo.com