Subject Re: [firebird-support] Is some API to get generator value?
Author Doug Chamberlin
On 4/12/11 3:54 AM, Kjell Rilbe wrote:
> Since others have replied there is no such API function, perhaps it's
> worth sontemplating what's "cheaper":
> 1. start trans, read generator, commit
> or:
> 2. start trans, read generator, rollback
Commits to transactions that have not touched table records are
essentially the same as rollbacks. Or, rather, rollbacks are essentially
commits. Even for transactions that only read data. No big difference.

This whole question is making much ado about nothing. Transactions are
very, very inexpensive in Firebird if no data from records is accessed
and no data from records is changed. Since you need a round trip from
the client to the server to get the generator value you cannot avoid
that communication expense. The rest is lost in the shuffle.