Subject | Generator Performance |
---|---|
Author | Matheus Degiovani |
Post date | 2011-09-23T18:18:19Z |
[Hello,
The firebird manual says that generators are thread-safe [1]. How does the
firebird engine guarantee that two consecutive executions of a "SELECT
NEXT VALUE FOR..." do not return the same value? Does it use a lock on the
RDB$GENERATOR table? Does the call to "SELECT NEXT VALUE..." block, when
another thread is reading/writing into it? Would that mean that having
multiple clients connected and issuing these commands simultaneously
degrade the performance of the database?
My application case is the following: I want to append a column to some
tables in my database representing an "update counter". Whenever an insert
or update command is issued, this field will be incremented (globally for
the whole database).
[1]
http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/generatorguide-basics.html
--
Matheus Degiovani
Gigatron Software e Treinamentos Ltda.
(18) 3649-4045
MSN: matheus@...
--
CrĂticas ou Sugestões? Ligue para Ouvidoria Gigatron: (18) 3649-4048
The firebird manual says that generators are thread-safe [1]. How does the
firebird engine guarantee that two consecutive executions of a "SELECT
NEXT VALUE FOR..." do not return the same value? Does it use a lock on the
RDB$GENERATOR table? Does the call to "SELECT NEXT VALUE..." block, when
another thread is reading/writing into it? Would that mean that having
multiple clients connected and issuing these commands simultaneously
degrade the performance of the database?
My application case is the following: I want to append a column to some
tables in my database representing an "update counter". Whenever an insert
or update command is issued, this field will be incremented (globally for
the whole database).
[1]
http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/generatorguide-basics.html
--
Matheus Degiovani
Gigatron Software e Treinamentos Ltda.
(18) 3649-4045
MSN: matheus@...
--
CrĂticas ou Sugestões? Ligue para Ouvidoria Gigatron: (18) 3649-4048