Subject RE: [firebird-support] selects are fast, but commit takes 10 seconds!!
Author Alan McDonald
> I have an application written in Java which uses IB6 and Firebird
> InterClient.
>
> In the application, there are places where I perform an ad-hoc query
> and return the results to a GUI. Psuedocode is:
>
> {
> db.beginTran();
> results = db.exec(selectStatement);
> db.commitTran();
>
> return result;
> }
>
> I put timings around each statement. Getting the results takes about
> 100ms, give or take, but the commit takes 10,000ms (almost exactly)
> every time. I tried changing the commit to a rollback, and it dropped
> to <10ms. I have two questions:
>
> 1) Where is that 10 second commit coming from? Some sort of timeout?
> 2) Is using rollback a safe/viable work-around for this speed issue?
>
> Thanks!
> - Dave

I suspect something else is going on here - I have a Palm conduit which
works with interclient and IB6 and IB5.6. Noone experiences anything in this
order, in fact it does quite a lot of hard work and is surprisingly fast (no
java gui helps). It has to commit in several places.

But your code does a commit and then wants to return the query results?
What's the logic here?

Alan