Subject | Re: [firebird-support] Re: Generators for auto-increment - with override |
---|---|
Author | Ann W. Harrison |
Post date | 2005-01-06T16:34:10Z |
Adam wrote:
That page is normally in cache, so the cost of the operation is
approximately switching from a read lock to a write lock - very low -
and the same whether you add 1 or 100 to the value. The generator page
is written every time a transaction that changed it commits, which is
another cost.
Regards,
Ann
>The "mutex" is the lock on the page that contains the generator value.
> Calls to generators are threadsafe, which means they must use some
> form of mutex locking. The only possible bottleneck I can see is the
> excessive calls to the generator, but I really doubt that will become
> an issue.
That page is normally in cache, so the cost of the operation is
approximately switching from a read lock to a write lock - very low -
and the same whether you add 1 or 100 to the value. The generator page
is written every time a transaction that changed it commits, which is
another cost.
Regards,
Ann