[
https://issues.apache.org/jira/browse/DERBY-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559388#action_12559388
]
Kristian Waagan commented on DERBY-3313:
----------------------------------------
Bryan wrote:
> Thanks Kristian! Are the following statements true?
> - for each physical PreparedStatement, there will be exactly 1 logical
> PreparedStatement
I think this should be rephrased as "for each physical PreparedStatement, there
will be exactly 1 active logical PreparedStatement".
A logical prepared statement is activated when it is preprared
(Connection.prepareStatement) and is no longer active when close has been
called.
There might be error situations causing the statement to be closed as well.
Over time, one physical PreparedStatement can serve a number of logical
PreparedStatements.
> - for each logical PreparedStatement, there will be exactly 1 physical
> PreparedStatement
Yes, this is true.
If a logical prepared statement has a reference to a physical prepared
statement, it is the only one with such a reference.
Note that after a close, a logical prepared statement does not refer any
physical prepared statement and is eligible for garbage collection when the
client no longer references it.
> Or, is there ever a case where two different logical PreparedStatements point
> to the
> same physical PreparedStatement?
No.
> JDBC client driver statement cache
> ----------------------------------
>
> Key: DERBY-3313
> URL: https://issues.apache.org/jira/browse/DERBY-3313
> Project: Derby
> Issue Type: New Feature
> Components: JDBC, Network Client
> Affects Versions: 10.4.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Fix For: 10.4.0.0
>
> Attachments: derby-3313-1a-early_prototype.diff,
> derby-3313-1a-early_prototype.stat, JDBCClientStatementCacheOverview.txt
>
>
> A statement cache in the JDBC client driver will help increase performance in
> certain scenarios, for instance some multi-tier systems using connection
> pooling.
> Please consult the comments and documents attached to this issue for more
> information.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.