db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "StatementCache" by BryanPendleton
Date Mon, 21 Sep 2009 15:07:31 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The "StatementCache" page has been changed by BryanPendleton:

New page:
Derby caches prepared statements instances on a per-connection basis in the statement cache,
to avoid the overhead of re-preparing the statements.

Some code to look at while studying the statement cache includes:

* GenericLanguageConnectionFactory.getStatementCache
* GenericLanguageConnectionContext.lookupStatement
* GenericStatement.prepMinion
* ConcurrentCache.find
* GenericStatement.equals and GenericStatement.hashCode

There are some problems involved in using the statement cache. For one thing, sometimes the
statement cache causes us to fail to re-compile a statement when we *should* recompile it
(for example, if we were to recompile it now, we'd get a better query plan) -- DERBY-3892.

For another thing, the statement cache may cause us to need to recompile the statement at
an awkward time, leading to deadlocks -- DERBY-4279

View raw message