Subject Re: [firebird-support] Is some API to get generator value?
Author Norman Dunbar
Morning all,

On 12/04/11 08:54, 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

I don't know which is cheaper in Firebird, in Oracle the commit is cheaper.

However, how about a third option:

3. start transaction, read generator, do the remainder of the
transaction using the generator value, commit [or rollback as appropriate].

I personally can't think of when getting a value from a sequence would
require to be all by itself in a transaction.

Just my $0.02.


Cheers,
Norman.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767