Subject Re: [IBO] Orphaned Statements
Author Ulf Grasse
Both IB and FB seem to handle this the same. We've mainly concentrated on
debugging against IB7.x because of the performance stats available, but
we've seen progressive slow-down on FB databases as well. It seems also that
IBO is unique among interbase "drivers" in this behavior.

From a Bill Todd email:---
I am at the Borland Developers Conference. I mentioned the orphaned
statement problem to a friend of mine and he said that Jason told him,
several years ago, that IBO does not close the statement handle as an
optimization so that you can reuse the statement in another transaction
without having to prepare it again. If that is true, you need to find out
exactly what you must do in IBO to cause it to release the statement handle.

As far as I've been able to determine, this problem is very noticeable due
to the fact that our application does *not* reuse some queries. Due to
limitations in our schema, SQL in general and for performance reasons, we
often customize SQL before execution. It appears that when this happens, the
IBO is unable to release the statement handle associated with previous
preparations of the same procedure.

I think a good resolution would be to add a property to disable this
well-intentioned optimization either on database level or statement level
(or even both). While this is probably a good optimization for the majority
of applications out there, in our case it seems to impact performance rather

On 11/9/05, Jason Wharton <jwharton@...> wrote:
> What do you see as an appropriate resolution to this problem?
> Do you have any additional insight on this? Shouldn't this be fixed by
> InterBase and what does Firebird do in this case?
> Jason Wharton
> > -----Original Message-----
> > From: []On
> > Behalf Of Ulf Grasse
> > Sent: Friday, October 28, 2005 3:40 PM
> > To:
> > Subject: Re: [IBO] Orphaned Statements
> >
> >
> > While that is correct, the problem is that IB's memory management
> > seems overwhelmed by this. Some compile statements take up as much as
> > 15MB (that's Megabytes), and once you get to a point of having
> > hundreds of orphaned statements, it poses a severe performance
> > problem.
> >
> > It's plausible to think that IB ought to reuse prepared statement in
> > the context of a new transaction, but that doesn't seem to be the case
> > -- memory simply grows, and statements remain "STALLED" and orphaned.
> > And we have word from IB that this happens only when a statement
> > handle is not released prior to releasing the transaction.
> >
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Membership database software<> Database
> mortgage software<> Pda
> database software<> Database
> management software<> Database
> marketing software<> Online
> database software<>
> ------------------------------
> - Visit your group "IBObjects<>"
> on the web.
> - To unsubscribe from this group, send an email to:
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <>.
> ------------------------------

[Non-text portions of this message have been removed]