Subject | Re: [firebird-support] Re: Firebird and sharding ? - Email found in subject |
---|---|
Author | Mark Rotteveel |
Post date | 2012-03-31T16:20:08Z |
On 30-3-2012 14:24, Norman Dunbar wrote:
(preparing statements every time it needs it). It is the driver and/or
connection pool that should keep a pool of prepared statements (see
section 11.6 of JDBC 4.1) for reuse.
The application (and its developer) should not be bothered with keeping
track of prepared statements.
part of your application makes it more complex and puts responsibilities
in your application that don't belong there. It also duplicates what
connection pools (including statement pools) could be doing for you.
Mark
--
Mark Rotteveel
>> Extensive use of prepared statements and variablesI disagree, the application (or application developer) should do that
> Yes, and I'll bet they do what every Java application I've seen does,
> prepares the same statement hundreds of times, even though they should
> do it only once.
(preparing statements every time it needs it). It is the driver and/or
connection pool that should keep a pool of prepared statements (see
section 11.6 of JDBC 4.1) for reuse.
The application (and its developer) should not be bothered with keeping
track of prepared statements.
> SeeInteresting read. However keeping track of connections and statements as
> http://qdosmsq.dunbar-it.co.uk/blog/2009/02/it-must-be-efficient-im-using-bind-variables/
> for details. :-)
part of your application makes it more complex and puts responsibilities
in your application that don't belong there. It also duplicates what
connection pools (including statement pools) could be doing for you.
Mark
--
Mark Rotteveel