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?