Subject Re: [ib-support] Idea for a new field type for FB 2,0 or IB 7?
Author Nando Dessena
Ales,

> And what about, if I receive the number from a table inside a stored procedure like this:
>
> CREATE TABLE MYGEN (
> SERIESNAME VARCHAR(10),
> VALUE INTEGER
> )
>
> Inside the procedure:
> 1. lock the desired row
> 2. increment the value
> 3. read the new value
> 4. unlock the row
> 5. return the new value

This could work if you invoke the stored procedure in a snapshot
transaction that locks the table, but then you wouldn't need the stored
procedure to begin with. The fact is that this is a bottle neck, and all
bottle necks will get back to you one day or the other.
If you have say 10 users that don't do intensive stuff, then a
bottleneck is acceptable, like almost everyhing. I do it all the time in
non intensive applications.
Trouble arise when you scale up.

> This should happen very quickly so I would not wonder about conflicts

I would.
Ciao
--
____
_/\/ando