Subject | Re: [IBO] Orphaned Statements |
---|---|
Author | Aage Johansen |
Post date | 2005-10-26T21:10:55Z |
ulf_at_thgg wrote:
What happens if you prepare each query once (just before first use)?
(Obviously this is only applicable with constant (parameterized) queries).
I try to "prepare just once" and let them stay that way for the duration of
the app, and I haven't observed any ill effects. But then, there's
probably less than 100 queries (components) in that app. Obviously, at any
commit many queries don't belong to any transaction (which should not be of
any significance). A prepared query can be repeatedly used in many
transactions - what did Borland/Interbase mean with "releasing handles
before releasing a transaction"?
--
Aage J.
> we're using IBObjects in a fairly large project against Interbase andDo you _always_ prepare queries at each invocation (without ever unpreparing)?
> Firebird. We've been battling some performance issues for quite some
> time now.
> ...
> We discussed this with Interbase directly, and they explained that
> this situation occurs when a transaction is rolled back or committed
> before the associated statement handles are released. While
> admittedly this is something the server or the API should take care
> of, it is up to the application to keep track of open statement
> handles and to release them before releasing a transaction.
What happens if you prepare each query once (just before first use)?
(Obviously this is only applicable with constant (parameterized) queries).
I try to "prepare just once" and let them stay that way for the duration of
the app, and I haven't observed any ill effects. But then, there's
probably less than 100 queries (components) in that app. Obviously, at any
commit many queries don't belong to any transaction (which should not be of
any significance). A prepared query can be repeatedly used in many
transactions - what did Borland/Interbase mean with "releasing handles
before releasing a transaction"?
--
Aage J.